nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 49 lines 1.4 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 runCommand, 6 git, # for passthru tests 7 pgit, # for passthru tests 8}: 9 10buildGoModule (finalAttrs: { 11 pname = "pgit"; 12 version = "1.1.0"; 13 14 src = fetchFromGitHub { 15 owner = "picosh"; 16 repo = "pgit"; 17 rev = "v${finalAttrs.version}"; 18 hash = "sha256-81ZiaY973+mGnYbDX+6fhe9NTYjQhWsvdpW0v42pasw="; 19 }; 20 21 vendorHash = "sha256-in8GVcOlGsvmcbegJmYwvE0AVJhVJ83x1v3ymV0uTpg="; 22 23 passthru.tests.smoke = 24 runCommand "pgit-smoke-test" 25 { 26 buildInputs = [ git ]; 27 } 28 '' 29 ${lib.getExe git} init -b smoke 30 ${lib.getExe git} config --local user.name "Nick Spackages" 31 ${lib.getExe git} config --local user.email "nixbld@localhost" 32 echo "Read me please" > README 33 ${lib.getExe git} add README 34 ${lib.getExe git} commit -m "First commit" 35 ${lib.getExe pgit} -desc "The description" -revs smoke -repo . -out ./public 36 grep "The description" ./public/index.html 37 grep "First commit" ./public/logs/smoke/index.html 38 grep "Read me please" ./public/tree/smoke/item/README.html 39 touch $out 40 ''; 41 42 meta = { 43 description = "static site generator for git"; 44 homepage = "https://pgit.pico.sh/"; 45 license = lib.licenses.mit; 46 mainProgram = "pgit"; 47 maintainers = with lib.maintainers; [ jaculabilis ]; 48 }; 49})