python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / package-management / nix-template / default.nix
blob034641ab48750b6aa329f9cb62b03b44d8a0da5f
1 { lib, stdenv, rustPlatform, fetchFromGitHub
2 , installShellFiles
3 , makeWrapper
4 , nix
5 , openssl
6 , pkg-config
7 , Security
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "nix-template";
12   version = "0.4.0";
14   src = fetchFromGitHub {
15     name = "${pname}-${version}-src";
16     owner = "jonringer";
17     repo = pname;
18     rev = "v${version}";
19     sha256 = "sha256-5Xxv9TH5rGA4VU/64YarrBIOrROWjFu3RYRcoNo70UA=";
20   };
22   cargoSha256 = "sha256-GvIE46NXNWg1kSEbffvOCwVDr0YmVMo8C8+52RDEwco=";
24   nativeBuildInputs = [
25     installShellFiles
26     makeWrapper
27     pkg-config
28   ];
30   buildInputs = [ openssl ]
31     ++ lib.optional stdenv.isDarwin Security;
33   # needed for nix-prefetch-url
34   postInstall = ''
35     wrapProgram $out/bin/nix-template \
36       --prefix PATH : ${lib.makeBinPath [ nix ]}
38     installShellCompletion --cmd nix-template \
39       --bash <($out/bin/nix-template completions bash) \
40       --fish <($out/bin/nix-template completions fish) \
41       --zsh <($out/bin/nix-template completions zsh)
42   '';
44   meta = with lib; {
45     description = "Make creating nix expressions easy";
46     homepage = "https://github.com/jonringer/nix-template/";
47     changelog = "https://github.com/jonringer/nix-template/releases/tag/v${version}";
48     license = licenses.cc0;
49     maintainers = with maintainers; [ jonringer ];
50   };