From 237c0484fe86d147654e54c1a264fad6d578c5c9 Mon Sep 17 00:00:00 2001 From: embr Date: Fri, 24 Nov 2023 20:35:39 +0100 Subject: [PATCH 1/2] nix-web: 0.1.0 -> 0.2.0 --- pkgs/by-name/ni/nix-web/package.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ni/nix-web/package.nix b/pkgs/by-name/ni/nix-web/package.nix index e41e760a2939..0058073d12e4 100644 --- a/pkgs/by-name/ni/nix-web/package.nix +++ b/pkgs/by-name/ni/nix-web/package.nix @@ -3,7 +3,8 @@ , fetchFromGitea , pkg-config , openssl -, nix +, nixVersions +, nixPackage ? nixVersions.nix_2_17 }: let @@ -11,16 +12,16 @@ 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 ]; @@ -36,7 +37,7 @@ 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"; From 7b971ce7d12291ee25f85f2ad3be5f3d6adcf521 Mon Sep 17 00:00:00 2001 From: Finn Behrens Date: Fri, 1 Dec 2023 19:52:36 +0100 Subject: [PATCH 2/2] nix-web: Build on platforms.unix, depend on OpenSSL if not on Darwin This matches the `platform` setting for nix itself, as much as I don't have a good way to test this on anything but Linux right now. Co-Authored-By: Finn Behrens --- pkgs/by-name/ni/nix-web/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ni/nix-web/package.nix b/pkgs/by-name/ni/nix-web/package.nix index 0058073d12e4..bc79ba376e1e 100644 --- a/pkgs/by-name/ni/nix-web/package.nix +++ b/pkgs/by-name/ni/nix-web/package.nix @@ -1,10 +1,12 @@ { lib +, stdenv , rustPlatform , fetchFromGitea , pkg-config , openssl , nixVersions , nixPackage ? nixVersions.nix_2_17 +, darwin }: let @@ -24,7 +26,8 @@ rustPlatform.buildRustPackage rec { 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 \ @@ -43,6 +46,7 @@ rustPlatform.buildRustPackage rec { 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"; };