gitAndTools.git-dit: 0.1.0 -> 0.3.0

authored by Matthias Beyer and committed by Jörg Thalheim 5a21efdc 210731c7

+27 -27
+27 -27
pkgs/applications/version-management/git-and-tools/git-dit/default.nix
··· 1 - { stdenv, fetchFromGitHub, pandoc }: 1 + { stdenv 2 + , fetchFromGitHub 3 + , openssl 4 + , gcc 5 + , zlib 6 + , libssh 7 + , cmake 8 + , perl 9 + , pkgconfig 10 + , rustPlatform 11 + }: 12 + 13 + with rustPlatform; 2 14 3 - stdenv.mkDerivation rec { 15 + buildRustPackage rec { 4 16 name = "git-dit-${version}"; 5 - version = "0.1.0"; 6 - 7 - buildInputs = [ pandoc ]; 17 + version = "0.4.0"; 8 18 9 19 src = fetchFromGitHub { 10 20 owner = "neithernut"; 11 21 repo = "git-dit"; 12 22 rev = "v${version}"; 13 - sha256 = "1rvp2dhnb8yqrracvfpvf8z1vz4fs0rii18hhrskr6n1sfd7x9kd"; 23 + sha256 = "1sx6sc2dj3l61gbiqz8vfyhw5w4xjdyfzn1ixz0y8ipm579yc7a2"; 14 24 }; 15 25 16 - # the Makefile doesn’t work, we emulate it below 17 - dontBuild = true; 18 - 19 - postPatch = '' 20 - # resolve binaries to the right path 21 - sed -e "s|exec git-dit-|exec $out/bin/git-dit-|" -i git-dit 26 + depsSha256 = "1z2n3z5wkh5z5vc976yscq77fgjszwzwlrp7g17hmsbhzx6x170h"; 22 27 23 - # we change every git dit command to the local subcommand path 24 - # (git dit foo -> /nix/store/…-git-dit/bin/git-dit-foo) 25 - for script in git-dit-*; do 26 - sed -e "s|git dit |$out/bin/git-dit-|g" -i "$script" 27 - done 28 - ''; 28 + nativeBuildInputs = [ 29 + cmake 30 + pkgconfig 31 + perl 32 + ]; 29 33 30 - installPhase = '' 31 - mkdir -p $out/{bin,share/man/man1} 32 - # from the Makefile 33 - ${stdenv.lib.getBin pandoc}/bin/pandoc -s -t man git-dit.1.md \ 34 - -o $out/share/man/man1/git-dit.1 35 - cp git-dit* $out/bin 36 - ''; 34 + buildInputs = [ 35 + openssl 36 + libssh 37 + zlib 38 + ]; 37 39 38 40 meta = with stdenv.lib; { 39 41 inherit (src.meta) homepage; ··· 41 43 license = licenses.gpl2; 42 44 maintainers = with maintainers; [ profpatsch matthiasbeyer ]; 43 45 }; 44 - 45 - 46 46 }