at master 936 B view raw
1{ 2 lib, 3 runCommand, 4 testers, 5 6 cacert, 7 homf, 8}: 9let 10 # runs homf, putting the fetched artefacts in the drv output 11 Homf = 12 subcommand: 13 { 14 pkgName, 15 version, 16 hash, 17 }: 18 # testers.runCommand ensures we have an FOD, so the command has network access, 19 # yet the test is rerun whenever one of its inputs changes. 20 testers.runCommand { 21 name = "homf-${subcommand}-${pkgName}"; 22 script = "homf ${subcommand} --directory $out ${pkgName} ${version}"; 23 nativeBuildInputs = [ 24 cacert 25 homf 26 ]; 27 inherit hash; 28 }; 29in 30 31lib.mapAttrs Homf { 32 pypi = { 33 pkgName = "homf"; 34 version = "1.1.1"; # pinned so updating homf won't invalidate hashes 35 hash = "sha256-zpdt7+zTaGkLG6xYoTZVw/kUek0/MrCqvljfLxNB94A="; 36 }; 37 38 github = { 39 pkgName = "duckinator/homf"; 40 version = "v1.1.1"; 41 hash = "sha256-NeEz8wZqDWYUnrgsknXWHzhWdk8cPW8mknKS3+/dngQ="; 42 }; 43}