From 70580fdab7f76f8e2024337a2b6c6712ce6eba6a Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 11 Jul 2021 15:51:54 -0700 Subject: [PATCH] nix-template: 0.1.0 -> 0.1.1 --- .../nix-template/default.nix | 24 +++++++++++++++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/package-management/nix-template/default.nix b/pkgs/tools/package-management/nix-template/default.nix index 0345830fb9dd..f56222f403a2 100644 --- a/pkgs/tools/package-management/nix-template/default.nix +++ b/pkgs/tools/package-management/nix-template/default.nix @@ -1,17 +1,33 @@ -{ lib, rustPlatform, fetchFromGitHub }: +{ lib, stdenv, rustPlatform, fetchFromGitHub +, makeWrapper +, nix +, openssl +, pkg-config +, Security +}: rustPlatform.buildRustPackage rec { pname = "nix-template"; - version = "0.1.0"; + version = "0.1.1"; src = fetchFromGitHub { owner = "jonringer"; repo = pname; rev = "v${version}"; - sha256 = "1h6xdvhzg7nb0s82b3r5bsh8bfdb1l5sm7fa24lfwd396xp9yyig"; + sha256 = "sha256-A1b/fgSr27sfMDnTi4R3PUZfhAdLA5wUOd4yh9/4Bnk="; }; - cargoSha256 = "0hp31b5q4s6grkha2jz55945cbjkqdpvx1l8m49zv5prczhd7mz5"; + cargoSha256 = "sha256-resyY/moqLo4KWOKUvFJiOWealCmcEsLFgkN12slKN0="; + + nativeBuildInputs = [ makeWrapper pkg-config ]; + buildInputs = [ openssl ] + ++ lib.optional stdenv.isDarwin Security; + + # needed for nix-prefetch-url + postInstall = '' + wrapProgram $out/bin/nix-template \ + --prefix PATH : ${lib.makeBinPath [ nix ]} + ''; meta = with lib; { description = "Make creating nix expressions easy"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df6c3f0a82ea..828a3f022cf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3079,7 +3079,9 @@ in nix-output-monitor = haskell.lib.justStaticExecutables (haskellPackages.nix-output-monitor); - nix-template = callPackage ../tools/package-management/nix-template { }; + nix-template = callPackage ../tools/package-management/nix-template { + inherit (darwin.apple_sdk.frameworks) Security; + }; nodepy-runtime = with python3.pkgs; toPythonApplication nodepy-runtime;