Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 80 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 writeShellScriptBin, 6 skawarePackages, 7}: 8 9let 10 version = "1.3.0"; 11 sha256 = "sha256-CFv9gZQHeEiZctJFyB6PJ1dVNkrQ7PlVtgZuteQQTJ0="; 12 13in 14stdenv.mkDerivation { 15 pname = "git-vendor"; 16 inherit version; 17 18 src = fetchFromGitHub { 19 owner = "brettlangdon"; 20 repo = "git-vendor"; 21 rev = "v${version}"; 22 inherit sha256; 23 }; 24 25 outputs = [ 26 "bin" 27 "man" 28 "doc" 29 "out" 30 ]; 31 32 PREFIX = (placeholder "out"); 33 BINPREFIX = "${placeholder "bin"}/bin"; 34 MANPREFIX = "${placeholder "man"}/share/man/man1"; 35 36 buildInputs = [ 37 # stubbing out a `git config` check that `make install` tries to do 38 (writeShellScriptBin "git" "") 39 ]; 40 41 postInstall = '' 42 ${ 43 skawarePackages.cleanPackaging.commonFileActions { 44 docFiles = [ 45 "LICENSE" 46 "README.md" 47 ]; 48 noiseFiles = [ 49 "bin/git-vendor" 50 "Makefile" 51 "etc/bash_completion.sh" 52 "man" 53 "install.sh" 54 ]; 55 } 56 } $doc/share/doc/git-vendor 57 ''; 58 59 postFixup = '' 60 ${skawarePackages.cleanPackaging.checkForRemainingFiles} 61 ''; 62 63 meta = { 64 description = "Git command for managing vendored dependencies"; 65 longDescription = '' 66 git-vendor is a wrapper around git-subtree commands for checking out and updating vendored dependencies. 67 68 By default git-vendor conforms to the pattern used for vendoring golang dependencies: 69 * Dependencies are stored under vendor/ directory in the repo. 70 * Dependencies are stored under the fully qualified project path. 71 e.g. https://github.com/brettlangdon/forge will be stored under vendor/github.com/brettlangdon/forge. 72 ''; 73 homepage = "https://github.com/brettlangdon/git-vendor"; 74 license = lib.licenses.mit; 75 maintainers = [ ]; 76 platforms = lib.platforms.all; 77 mainProgram = "git-vendor"; 78 }; 79 80}