diff options
author | Timo Kaufmann <timokau@zoho.com> | 2020-04-07 16:06:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 16:06:14 +0000 |
commit | 0382ea83024034f36f91211c79b3c52f06312a01 (patch) | |
tree | 829362a01e56e424f6557e88265c731640aa1aea | |
parent | 92b5115c5979427e9eab0e28362dc69a01cd7e5d (diff) | |
parent | 821527fae8f495bda22d14d93d84e9f59501a43a (diff) | |
download | nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar.gz nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar.bz2 nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar.lz nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar.xz nixlib-0382ea83024034f36f91211c79b3c52f06312a01.tar.zst nixlib-0382ea83024034f36f91211c79b3c52f06312a01.zip |
Merge pull request #81919 from xzfc/cached-nix-shell
cached-nix-shell: init at 0.1.2
-rw-r--r-- | pkgs/tools/nix/cached-nix-shell/default.nix | 49 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/tools/nix/cached-nix-shell/default.nix b/pkgs/tools/nix/cached-nix-shell/default.nix new file mode 100644 index 000000000000..dc69d3f030d7 --- /dev/null +++ b/pkgs/tools/nix/cached-nix-shell/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchFromGitHub, openssl, pkgconfig, ronn, rustPlatform }: + +let + blake3-src = fetchFromGitHub { + owner = "BLAKE3-team"; + repo = "BLAKE3"; + rev = "0.3.1"; + sha256 = "0wkxx2w56hsng28p8zpndsy288ix4s5qg6xqjzgjz53fbyk46hda"; + }; + +in rustPlatform.buildRustPackage rec { + pname = "cached-nix-shell"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "xzfc"; + repo = pname; + rev = "v${version}"; + sha256 = "0pzwknpc4qrh9pv5z0xvldql2dkj9ddksvaci86a4f8cnd86p2l6"; + }; + + cargoSha256 = "1n88gcnrfdrk025hb54igc83cn5vlv8n6ndyx1ydmzhd95vhbznf"; + + # The BLAKE3 C library is intended to be built by the project depending on it + # rather than as a standalone library. + # https://github.com/BLAKE3-team/BLAKE3/blob/0.3.1/c/README.md#building + BLAKE3_CSRC = "${blake3-src}/c"; + + nativeBuildInputs = [ ronn ]; + + postBuild = '' + ronn -r cached-nix-shell.1.md + ''; + + postInstall = '' + mkdir -p $out/lib $out/share/cached-nix-shell $out/share/man/man1 $out/var/empty + cp target/release/build/cached-nix-shell-*/out/trace-nix.so $out/lib + cp rcfile.sh $out/share/cached-nix-shell/rcfile.sh + cp cached-nix-shell.1 $out/share/man/man1 + ''; + + meta = with stdenv.lib; { + description = "Instant startup time for nix-shell"; + homepage = "https://github.com/xzfc/cached-nix-shell"; + license = with licenses; [ unlicense /* or */ mit ]; + maintainers = with maintainers; [ xzfc ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e7d644b0524..cd3d4afbd564 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25094,6 +25094,8 @@ in brightnessctl = callPackage ../misc/brightnessctl { }; + cached-nix-shell = callPackage ../tools/nix/cached-nix-shell {}; + calaos_installer = libsForQt5.callPackage ../misc/calaos/installer {}; ccemux = callPackage ../misc/emulators/ccemux { }; |