Skip to content

Commit

Permalink
Merge pull request #269716 from liclac/nix-web-0.2.0
Browse files Browse the repository at this point in the history
nix-web: 0.1.0 -> 0.2.0
  • Loading branch information
RaitoBezarius authored Jan 12, 2024
2 parents 724d534 + 7b971ce commit 997e797
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pkgs/by-name/ni/nix-web/package.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitea
, pkg-config
, openssl
, nix
, nixVersions
, nixPackage ? nixVersions.nix_2_17
, darwin
}:

let
cargoFlags = [ "-p" "nix-web" ];
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 \
Expand All @@ -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";
};
Expand Down

0 comments on commit 997e797

Please sign in to comment.