Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, installShellFiles, e2fsprogs }: 2 3let 4 manpage = fetchurl { 5 url = "https://manpages.ubuntu.com/manpages.gz/xenial/man8/zerofree.8.gz"; 6 sha256 = "0y132xmjl02vw41k794psa4nmjpdyky9f6sf0h4f7rvf83z3zy4k"; 7 }; 8in stdenv.mkDerivation rec { 9 pname = "zerofree"; 10 version = "1.1.1"; 11 12 src = fetchurl { 13 url = "https://frippery.org/uml/${pname}-${version}.tgz"; 14 sha256 = "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"; 15 }; 16 17 buildInputs = [ e2fsprogs installShellFiles ]; 18 19 installPhase = '' 20 mkdir -p $out/bin $out/share/zerofree 21 cp zerofree $out/bin 22 cp COPYING $out/share/zerofree/COPYING 23 installManPage ${manpage} 24 ''; 25 26 meta = { 27 homepage = "https://frippery.org/uml/"; 28 description = "Zero free blocks from ext2, ext3 and ext4 file-systems"; 29 platforms = lib.platforms.linux; 30 license = lib.licenses.gpl2; 31 maintainers = [ lib.maintainers.theuni ]; 32 }; 33}