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 <me@kloenk.de>
This commit is contained in:
parent
237c0484fe
commit
7b971ce7d1
1 changed files with 5 additions and 1 deletions
|
@ -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";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue