about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlbert Safin <xzfcpw@gmail.com>2024-06-23 19:19:50 +0000
committerAlbert Safin <xzfcpw@gmail.com>2024-07-07 22:28:05 +0000
commite170ba17d1417bf721d549cb9e5e8adb26c6f876 (patch)
tree1a575ab6e1ede4cf7c2903c46db1d021ed80b34b
parente0ba5d6aaf27ed0deb1ad168bd151a6fd23634f1 (diff)
cached-nix-shell: 0.1.5 -> 0.1.6
-rw-r--r--pkgs/by-name/ca/cached-nix-shell/package.nix61
-rw-r--r--pkgs/tools/nix/cached-nix-shell/default.nix47
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 61 insertions, 49 deletions
diff --git a/pkgs/by-name/ca/cached-nix-shell/package.nix b/pkgs/by-name/ca/cached-nix-shell/package.nix
new file mode 100644
index 0000000000000..71256c2b1b5cb
--- /dev/null
+++ b/pkgs/by-name/ca/cached-nix-shell/package.nix
@@ -0,0 +1,61 @@
+{
+  fetchFromGitHub,
+  lib,
+  nix,
+  ronn,
+  rustPlatform,
+}:
+
+let
+  blake3-src = fetchFromGitHub {
+    owner = "BLAKE3-team";
+    repo = "BLAKE3";
+    rev = "refs/tags/1.5.1";
+    hash = "sha256-STWAnJjKrtb2Xyj6i1ACwxX/gTkQo5jUHilcqcgJYxc=";
+  };
+in
+rustPlatform.buildRustPackage rec {
+  pname = "cached-nix-shell";
+  version = "0.1.6";
+
+  src = fetchFromGitHub {
+    owner = "xzfc";
+    repo = "cached-nix-shell";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-LI/hecqeRg3eCzU2bASJA8VoG4nvrSeHSeaGYn7M/UI=";
+  };
+
+  cargoHash = "sha256-Jf0VRTGwdKxCwyb9hVKDQcdZsHHWaedrDbwq9MK1tn4=";
+
+  nativeBuildInputs = [
+    nix
+    ronn
+  ];
+
+  # 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
+  env.BLAKE3_CSRC = "${blake3-src}/c";
+
+  postBuild = ''
+    make -f nix/Makefile post-build
+  '';
+
+  postInstall = ''
+    make -f nix/Makefile post-install
+  '';
+
+  meta = {
+    description = "Instant startup time for nix-shell";
+    mainProgram = "cached-nix-shell";
+    homepage = "https://github.com/xzfc/cached-nix-shell";
+    changelog = "https://github.com/xzfc/cached-nix-shell/releases/tag/v${version}";
+    license = with lib.licenses; [
+      unlicense
+      # or
+      mit
+    ];
+    maintainers = with lib.maintainers; [ xzfc ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/pkgs/tools/nix/cached-nix-shell/default.nix b/pkgs/tools/nix/cached-nix-shell/default.nix
deleted file mode 100644
index 84672a8e96a39..0000000000000
--- a/pkgs/tools/nix/cached-nix-shell/default.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ lib, fetchFromGitHub, nix, ronn, rustPlatform }:
-
-let
-  blake3-src = fetchFromGitHub {
-    owner = "BLAKE3-team";
-    repo = "BLAKE3";
-    rev = "0.3.3";
-    sha256 = "0av41ld0gqf3g60gcllpz59nqlr7r62v99mgfq9gs0p8diw5gi7x";
-  };
-
-in rustPlatform.buildRustPackage rec {
-  pname = "cached-nix-shell";
-  version = "0.1.5";
-
-  src = fetchFromGitHub {
-    owner = "xzfc";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "17v38llx83mp05a0axjxcd2zyafd57syh7xhx5cq6qibcbha0by9";
-  };
-
-  cargoSha256 = "1jkkwsn3k2anmzf99x99r9zfnf0gpcjbi5pyakh4agiryqcdyg0j";
-
-  # 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 = [ nix ronn ];
-
-  postBuild = ''
-    make -f nix/Makefile post-build
-  '';
-
-  postInstall = ''
-    make -f nix/Makefile post-install
-  '';
-
-  meta = with lib; {
-    description = "Instant startup time for nix-shell";
-    mainProgram = "cached-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 ae15165165ff2..516a097697bb8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -38908,8 +38908,6 @@ with pkgs;
 
   brightnessctl = callPackage ../misc/brightnessctl { };
 
-  cached-nix-shell = callPackage ../tools/nix/cached-nix-shell { };
-
   calaos_installer = libsForQt5.callPackage ../misc/calaos/installer { };
 
   civo = callPackage ../applications/networking/cluster/civo { };