mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
merge #5521: give fetchgit outputs nicer names
This commit is contained in:
commit
7637e71cee
@ -11,7 +11,7 @@ let
|
||||
name="${baseName}-${version}";
|
||||
url="https://github.com/GNUFreetalk/freetalk";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256="0sj3bwq9n6ijwv552nmi038sz7wayq8r3zaj6ngn2cnkn2b5nwbz";
|
||||
sha256="0vh6snkd66gdzimdiyy9idhsip60d5xc7qh4w48k7n8h93ydrb2b";
|
||||
};
|
||||
buildInputs = [
|
||||
guile pkgconfig glib loudmouth gmp libidn readline libtool
|
||||
@ -24,7 +24,6 @@ stdenv.mkDerivation {
|
||||
inherit buildInputs;
|
||||
src = fetchgit {
|
||||
inherit (s) url rev sha256;
|
||||
name = "git-export-${s.name}";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -1,6 +1,20 @@
|
||||
{stdenv, git, cacert}:
|
||||
{url, rev ? "HEAD", md5 ? "", sha256 ? "", leaveDotGit ? false, fetchSubmodules ? true
|
||||
, name ? "git-export"
|
||||
{stdenv, git, cacert}: let
|
||||
urlToName = url: rev: let
|
||||
base = baseNameOf url;
|
||||
|
||||
matched = (builtins.match or (x: y:
|
||||
abort "This version of fetchgit requires Nix >= 1.8, please upgrade!"
|
||||
)) "(.*).git" base;
|
||||
|
||||
short = builtins.substring 0 7 rev;
|
||||
|
||||
appendShort = if (builtins.match "[a-f0-9]*" rev) != null
|
||||
then "-${short}"
|
||||
else "";
|
||||
in "${if matched == null then base else builtins.head matched}${appendShort}";
|
||||
in {url, rev ? "HEAD", md5 ? "", sha256 ? "", leaveDotGit ? false
|
||||
, fetchSubmodules ? true
|
||||
, name ? urlToName url rev
|
||||
}:
|
||||
|
||||
/* NOTE:
|
||||
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
src = "${srcs.df_unfuck} ${srcs.df}";
|
||||
phases = "unpackPhase patchPhase configurePhase buildPhase installPhase";
|
||||
|
||||
sourceRoot = "git-export";
|
||||
sourceRoot = srcs.df_unfuck.name;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
|
||||
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||
echo $(md5sum $out/share/df_linux/libs/Dwarf_Fortress | cut -c1-8) > $out/share/df_linux/hash.md5.orig
|
||||
# Fix rpath
|
||||
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.glibc ]}:$out/share/df_linux/libs" $out/share/df_linux/libs/Dwarf_Fortress
|
||||
cp -f ./git-export/build/libgraphics.so $out/share/df_linux/libs/libgraphics.so
|
||||
cp -f ./${srcs.df_unfuck.name}/build/libgraphics.so $out/share/df_linux/libs/libgraphics.so
|
||||
|
||||
cp $permission $out/share/df_linux/nix_permission
|
||||
|
||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation {
|
||||
inherit rev;
|
||||
};
|
||||
|
||||
sourceRoot = "git-export/src";
|
||||
preConfigure = "cd src";
|
||||
|
||||
makeFlags =
|
||||
[ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
|
||||
|
@ -12,11 +12,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ openldap openssl popt glib ncurses readline pkgconfig cyrus_sasl autoconf automake ];
|
||||
|
||||
setSourceRoot = ''
|
||||
sourceRoot=git-export/ldapvi
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd ldapvi
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
|
@ -9,7 +9,6 @@ stdenv.mkDerivation {
|
||||
url = "http://github.com/brianb/mdbtools.git";
|
||||
rev = "9ab40e83e6789015c965c92bdb62f92f8cdd0dbd";
|
||||
sha256 = "18j1a9y9xhl7hhx30zvmx2n4w7dc8c7sdr6722sf3mh5230mvv59";
|
||||
name = "mdbtools-git-export";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -33,10 +33,10 @@ let
|
||||
postPatch = ''
|
||||
export wineDir=$(pwd)
|
||||
patchShebangs $wineDir/tools/
|
||||
chmod u+w $wineDir/../git-export/debian/tools/
|
||||
patchShebangs $wineDir/../git-export/debian/tools/
|
||||
chmod -R +rwx ../git-export/
|
||||
make -C ../git-export/patches DESTDIR=$wineDir install
|
||||
chmod u+w $wineDir/../${wine_patches.name}/debian/tools/
|
||||
patchShebangs $wineDir/../${wine_patches.name}/debian/tools/
|
||||
chmod -R +rwx ../${wine_patches.name}/
|
||||
make -C ../${wine_patches.name}/patches DESTDIR=$wineDir install
|
||||
'';
|
||||
});
|
||||
|
||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace GNUmakefile --replace "/usr/local" "$out"
|
||||
'';
|
||||
|
||||
sourceRoot = "git-export/src";
|
||||
sourceRoot = "proot/src";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://proot.me;
|
||||
|
Loading…
Reference in New Issue
Block a user