mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 20:02:58 +03:00
xidel: refactor & fix eval
- Fix eval by removing reference to non-existent stdenv.glibc - Simplify patchelf calls - Set meta.platforms = linux
This commit is contained in:
parent
786c13c884
commit
f32a8eb6cc
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, dpkg, patchelf }:
|
{ stdenv, fetchurl, dpkg }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "xidel-${version}";
|
name = "xidel-${version}";
|
||||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||||||
}
|
}
|
||||||
else throw "xidel is not supported on ${stdenv.system}";
|
else throw "xidel is not supported on ${stdenv.system}";
|
||||||
|
|
||||||
buildInputs = [ dpkg patchelf ];
|
buildInputs = [ dpkg ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
dpkg-deb -x ${src} ./
|
dpkg-deb -x ${src} ./
|
||||||
@ -34,9 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
cp -a usr/* "$out/"
|
cp -a usr/* "$out/"
|
||||||
interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)"
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/bin/xidel"
|
||||||
patchelf --set-interpreter "$interpreter" "$out/bin/xidel"
|
|
||||||
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [stdenv.glibc]}" "$out/bin/xidel"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -45,7 +43,7 @@ stdenv.mkDerivation rec {
|
|||||||
# source contains no license info (AFAICS), but sourceforge says GPLv2
|
# source contains no license info (AFAICS), but sourceforge says GPLv2
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
# more platforms will be supported when we switch to source build
|
# more platforms will be supported when we switch to source build
|
||||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.bjornfor ];
|
maintainers = [ maintainers.bjornfor ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user