diff --git a/flake.lock b/flake.lock index 67226e7..f5fedda 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703499205, - "narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=", + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", "type": "github" }, "original": { diff --git a/nix/flake.lock b/nix/flake.lock index 71b966c..307b44a 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1703649338, - "narHash": "sha256-n2MkBotGgTQsfB+wH09R+otBwYCvGCsnHX7eUMGkKL0=", + "lastModified": 1704277720, + "narHash": "sha256-meAKNgmh3goankLGWqqpw73pm9IvXjEENJloF0coskE=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "8a8321271f0835fae2cb195e1137cb381fdbcc8e", + "rev": "0dd382b70c351f528561f71a0a7df82c9d2be9a4", "type": "github" }, "original": { @@ -99,11 +99,11 @@ ] }, "locked": { - "lastModified": 1703808179, - "narHash": "sha256-svlFDbozZlZJwnnSoeh5yE9jEnCmgmuRMRX866CL4J0=", + "lastModified": 1704498488, + "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", "owner": "nix-community", "repo": "home-manager", - "rev": "77c698fa4b3081b6019ad77d1bfedf06dbbde0db", + "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", "type": "github" }, "original": { @@ -135,11 +135,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703499205, - "narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=", + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", "type": "github" }, "original": { diff --git a/nix/nixpkgs/overlays/10-basic.nix b/nix/nixpkgs/overlays/10-basic.nix index 36ae3c3..3edf6b2 100644 --- a/nix/nixpkgs/overlays/10-basic.nix +++ b/nix/nixpkgs/overlays/10-basic.nix @@ -6,6 +6,8 @@ self: super: rec { sha256 = "1zxgy3znw0i6h1lxhmnx001c1pdcyszwqj8f0d0092nmnngdzsrl"; }; + cargo-workspaces = self.callPackage ./packages/cargo-workspaces.nix { }; + # kitty = super.kitty.overrideAttrs (existing: { # patches = [ # # From https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/terminal-emulators/kitty/default.nix diff --git a/nix/nixpkgs/overlays/packages/cargo-workspaces.nix b/nix/nixpkgs/overlays/packages/cargo-workspaces.nix new file mode 100644 index 0000000..e47eb82 --- /dev/null +++ b/nix/nixpkgs/overlays/packages/cargo-workspaces.nix @@ -0,0 +1,55 @@ +{ lib +, rustPlatform +, fetchCrate +, pkg-config +, libgit2_1_6 +, libssh2 +, openssl +, zlib +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-workspaces"; + version = "0.3.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-1wNoMVfouuPRGFGB6XIhgeeWgknxMctrBl5Vfco6qug="; + }; + + cargoHash = "sha256-OJGqIo6mYqXjmQb/2CVVTskecYZretw+K46Fvbu/PcQ="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libgit2_1_6 + libssh2 + openssl + zlib + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk_11_0.frameworks.SystemConfiguration + ]; + + env = { + LIBSSH2_SYS_USE_PKG_CONFIG = true; + }; + + meta = with lib; { + description = "A tool for managing cargo workspaces and their crates, inspired by lerna"; + longDescription = '' + A tool that optimizes the workflow around cargo workspaces with + git and cargo by providing utilities to version, publish, execute + commands and more. + ''; + homepage = "https://github.com/pksunkara/cargo-workspaces"; + changelog = "https://github.com/pksunkara/cargo-workspaces/blob/v${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda macalinao matthiasbeyer ]; + mainProgram = "cargo-workspaces"; + }; +} diff --git a/scripts/igm-switch b/scripts/igm-switch index 7ae0d1f..d1eedd8 100755 --- a/scripts/igm-switch +++ b/scripts/igm-switch @@ -9,7 +9,7 @@ SYSTEM_CONFIG_ATTRIBUTE=$(system_config_attribute) echo "Using flake at path $FLAKE_PATH." SHOW_TRACE='' -if [ $1 = '--debug' ]; then +if [ ${1:none} = '--debug' ]; then SHOW_TRACE='--show-trace' fi