about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2024-01-12 20:09:33 +0100
committerGitHub <noreply@github.com>2024-01-12 20:09:33 +0100
commit997e797d65872ae57a3f693f8384c2e24af4481e (patch)
tree4e596cc8fdb0f8d3f7cada8e5e0ffc7d0c6aa5b6 /pkgs/by-name
parent724d5348a6e84ebca1d841fc5f8be82572f71c42 (diff)
parent7b971ce7d12291ee25f85f2ad3be5f3d6adcf521 (diff)
Merge pull request #269716 from liclac/nix-web-0.2.0
nix-web: 0.1.0 -> 0.2.0
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/ni/nix-web/package.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/by-name/ni/nix-web/package.nix b/pkgs/by-name/ni/nix-web/package.nix
index e41e760a29397..bc79ba376e1e0 100644
--- a/pkgs/by-name/ni/nix-web/package.nix
+++ b/pkgs/by-name/ni/nix-web/package.nix
@@ -1,9 +1,12 @@
 { lib
+, stdenv
 , rustPlatform
 , fetchFromGitea
 , pkg-config
 , openssl
-, nix
+, nixVersions
+, nixPackage ? nixVersions.nix_2_17
+, darwin
 }:
 
 let
@@ -11,19 +14,20 @@ let
 in
 rustPlatform.buildRustPackage rec {
   pname = "nix-web";
-  version = "0.1.0";
+  version = "0.2.0";
 
   src = fetchFromGitea {
     domain = "codeberg.org";
     owner = "gorgon";
     repo = "gorgon";
     rev = "nix-web-v${version}";
-    hash = "sha256-+IDvoMRuMt1nS69yFhPPVs+s6Dj0dgXVdjjd9f3+spk=";
+    hash = "sha256-M/0nlD2jUtvdWJ647QHrp8JcUUVYxiLJlGjnZ+cfpYU=";
   };
-  cargoHash = "sha256-uVBfIw++MRxgVAC+KzGVuMZra8oktUfHcZQk90FF1a8=";
+  cargoHash = "sha256-6kcpP/CFiy571B98Y96/cdcClH50gdyPLZ28Npva7B4=";
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ openssl ];
+  buildInputs = lib.optional (!stdenv.isDarwin) openssl
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
 
   postPatch = ''
     substituteInPlace nix-web/nix-web.service \
@@ -36,12 +40,13 @@ rustPlatform.buildRustPackage rec {
   cargoBuildFlags = cargoFlags;
   cargoTestFlags = cargoFlags;
 
-  NIX_WEB_BUILD_NIX_CLI_PATH = "${nix}/bin/nix";
+  NIX_WEB_BUILD_NIX_CLI_PATH = "${nixPackage}/bin/nix";
 
   meta = with lib; {
     description = "Web interface for the Nix store";
     homepage = "https://codeberg.org/gorgon/gorgon/src/branch/main/nix-web";
     license = licenses.eupl12;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ embr ];
     mainProgram = "nix-web";
   };