nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub
2, python3
3, popt
4}:
5
6stdenv.mkDerivation rec {
7 pname = "isomd5sum";
8 version = "1.2.3";
9
10 src = fetchFromGitHub {
11 owner = "rhinstaller";
12 repo = pname;
13 rev = version;
14 sha256 = "1wjnh2hlp1hjjm4a8wzdhdrm73jq41lmpmy3ls0rh715p3j7z4q9";
15 };
16
17 strictDeps = true;
18 nativeBuildInputs = [ python3 ];
19 buildInputs = [ popt ] ;
20
21 postPatch = ''
22 substituteInPlace Makefile --replace "#/usr/" "#"
23 substituteInPlace Makefile --replace "/usr/" "/"
24 '';
25
26 dontConfigure = true;
27
28 makeFlags = [ "DESTDIR=${placeholder "out"}" ];
29
30 # we don't install python stuff as it borks up directories
31 installTargets = [ "install-bin" "install-devel" ];
32
33 meta = with lib; {
34 homepage = "https://github.com/rhinstaller/isomd5sum";
35 description = "Utilities for working with md5sum implanted in ISO images";
36 platforms = platforms.linux;
37 license = licenses.gpl2;
38 maintainers = with maintainers; [ knl ];
39 };
40}