Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 64 lines 1.7 kB view raw
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5, makeWrapper 6, bash 7, coreutils 8, git 9, pandoc 10}: 11 12let 13 version = "1.3.0"; 14 commit = "5bfe79b3632f15c442e8dc51ec206ab76354487f"; 15in buildGoModule { 16 pname = "gg-scm"; 17 inherit version; 18 19 src = fetchFromGitHub { 20 owner = "gg-scm"; 21 repo = "gg"; 22 rev = "v${version}"; 23 sha256 = "e628aeddb94d2470de860df09ef65499f8c5493fb336bf3df8502842ee02487f"; 24 }; 25 postPatch = '' 26 substituteInPlace cmd/gg/editor_unix.go \ 27 --replace /bin/sh ${bash}/bin/sh 28 ''; 29 subPackages = [ "cmd/gg" ]; 30 ldflags = [ 31 "-s" "-w" 32 "-X" "main.versionInfo=${version}" 33 "-X" "main.buildCommit=${commit}" 34 ]; 35 36 vendorSha256 = "214dc073dad7b323ea449acf24c5b578d573432eeaa1506cf5761a2d7f5ce405"; 37 38 nativeBuildInputs = [ pandoc installShellFiles makeWrapper ]; 39 nativeCheckInputs = [ bash coreutils git ]; 40 buildInputs = [ bash git ]; 41 42 postInstall = '' 43 wrapProgram $out/bin/gg --suffix PATH : ${git}/bin 44 pandoc --standalone --to man misc/gg.1.md -o misc/gg.1 45 installManPage misc/gg.1 46 installShellCompletion --cmd gg \ 47 --bash misc/gg.bash \ 48 --zsh misc/_gg.zsh 49 ''; 50 51 meta = with lib; { 52 mainProgram = "gg"; 53 description = "Git with less typing"; 54 longDescription = '' 55 gg is an alternative command-line interface for Git heavily inspired by Mercurial. 56 It's designed for less typing in common workflows, 57 making Git easier to use for both novices and advanced users alike. 58 ''; 59 homepage = "https://gg-scm.io/"; 60 changelog = "https://github.com/gg-scm/gg/blob/v${version}/CHANGELOG.md"; 61 license = licenses.asl20; 62 maintainers = with maintainers; [ zombiezen ]; 63 }; 64}