xzfc / cached-nix-shell

Instant startup time for nix-shell
https://xzfc.github.io/cached-nix-shell/cached-nix-shell.1
The Unlicense
203 stars 16 forks source link

Include in nixpkgs #8

Closed expipiplus1 closed 4 years ago

expipiplus1 commented 4 years ago

It would be nice to have this included in nixpkgs

xzfc commented 4 years ago

Good idea.

expipiplus1 commented 4 years ago

Note that this seems to build perfectly with buildRustPackage

     pkgs.rustPlatform.buildRustPackage rec {
        name = "cached-nix-shell";

        src = self.fetchFromGitHub {
          owner = "xzfc";
          repo = "cached-nix-shell";
          rev = "264d34405eecdcfa670d0a0451ee92877b615e3a";
          sha256 = "1gkdwbn252790cadfiniv41v131mrgkfq3k3myj98rs19hazbrxf";
        };

        cargoSha256 = "1rzhahbp5fwwpafa04xs4zfajcpf3bm73v691d13kgjg56p0iwyf";

        CNS_IN_NIX_BUILD = "1";

        buildInputs = [ self.openssl ];

        postInstall = ''
          mkdir -p $out/lib $out/var/empty $out/share/cached-nix-shell
          cp target/release/build/cached-nix-shell-*/out/trace-nix.so $out/lib
          cp rcfile.sh $out/share/cached-nix-shell/rcfile.sh
        '';
      };
expipiplus1 commented 4 years ago

and even cross compiles with that too.

xzfc commented 4 years ago

Added in https://github.com/NixOS/nixpkgs/pull/81919

expipiplus1 commented 4 years ago

Amazing!

On Wed, Apr 8, 2020, 12:11 AM xzfc notifications@github.com wrote:

Closed #8 https://github.com/xzfc/cached-nix-shell/issues/8.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xzfc/cached-nix-shell/issues/8#event-3210600609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRJXAZMYBFGB3IGCU3UYLRLNGCTANCNFSM4KTZDW5Q .