571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, gnupg
|
|
, perl
|
|
}:
|
|
|
|
let
|
|
perlEnv = perl.withPackages (p: with p; [ TextMarkdown ]);
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "regpg";
|
|
version = "1.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fanf2";
|
|
repo = "regpg";
|
|
rev = "regpg-${version}";
|
|
sha256 = "2ea99950804078190e1cc2a76d4740e3fdd5395a9043db3f3fe86bf2477d3a7d";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper perlEnv ];
|
|
|
|
postPatch = ''
|
|
patchShebangs ./util/insert-here.pl ./util/markdown.pl
|
|
substituteInPlace ./Makefile \
|
|
--replace 'util/insert-here.pl' 'perl util/insert-here.pl'
|
|
substituteInPlace ./Makefile \
|
|
--replace 'util/markdown.pl' 'perl util/markdown.pl'
|
|
substituteInPlace util/insert-here.pl \
|
|
--replace 'qx(git describe)' '"regpg-${version}"'
|
|
'';
|
|
|
|
dontConfigure = true;
|
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
|
|
|
postFixup = ''
|
|
patchShebangs $out/bin/regpg
|
|
wrapProgram $out/bin/regpg --prefix PATH ":" \
|
|
"${lib.makeBinPath [ gnupg ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "GPG wrapper utility for storing secrets in VCS";
|
|
mainProgram = "regpg";
|
|
homepage = "https://dotat.at/prog/regpg";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ _0xC45 ];
|
|
};
|
|
}
|