forked from mirrors/nixpkgs
xa: add fallback download url, fix substitution, enable tests
This commit is contained in:
parent
ccabc238a8
commit
2cedaac1cb
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, perl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -8,22 +9,39 @@ stdenv.mkDerivation rec {
|
||||||
version = "2.3.11";
|
version = "2.3.11";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.floodgap.com/retrotech/xa/dists/${pname}-${version}.tar.gz";
|
urls = [
|
||||||
|
"https://www.floodgap.com/retrotech/xa/dists/${pname}-${version}.tar.gz"
|
||||||
|
"https://www.floodgap.com/retrotech/xa/dists/unsupported/${pname}-${version}.tar.gz"
|
||||||
|
];
|
||||||
hash = "sha256-MvIWTJnjBSGOmSlwhW3Y4jCbXLasR1jXsq/jv+vJAS0=";
|
hash = "sha256-MvIWTJnjBSGOmSlwhW3Y4jCbXLasR1jXsq/jv+vJAS0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checkInputs = [ perl ];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace "DESTDIR" "PREFIX" \
|
|
||||||
--replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \
|
--replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \
|
||||||
--replace "LDD = gcc" "LDD = ${stdenv.cc.targetPrefix}cc" \
|
--replace "LD = gcc" "LD = ${stdenv.cc.targetPrefix}cc" \
|
||||||
--replace "CFLAGS = -O2" "CFLAGS ?=" \
|
--replace "CFLAGS = -O2" "CFLAGS ?=" \
|
||||||
--replace "LDFLAGS = -lc" "LDFLAGS ?= -lc"
|
--replace "LDFLAGS = -lc" "LDFLAGS ?= -lc"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
makeFlags = [
|
||||||
|
"DESTDIR:=${placeholder "out"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
# Running tests in parallel does not work
|
||||||
|
enableParallelChecking = false;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
patchShebangs tests
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.floodgap.com/retrotech/xa/";
|
homepage = "https://www.floodgap.com/retrotech/xa/";
|
||||||
|
|
Loading…
Reference in a new issue