qqwing: fix cross compilation and pkgconfig generation (#337264)
This commit is contained in:
commit
7f06d15798
@ -1,4 +1,12 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, perl, autoconf, automake, libtool }:
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
perl,
|
||||||
|
autoconf,
|
||||||
|
automake,
|
||||||
|
libtool,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "qqwing";
|
pname = "qqwing";
|
||||||
@ -7,31 +15,42 @@ stdenv.mkDerivation rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "stephenostermiller";
|
owner = "stephenostermiller";
|
||||||
repo = "qqwing";
|
repo = "qqwing";
|
||||||
rev = "v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "1qq0vi4ch4y3a5fb1ncr0yzkj3mbvdiwa3d51qpabq94sh0cz09i";
|
hash = "sha256-MYHPANQk4aUuDqUNxWPbqw45vweZ2bBcUcMTyEjcAOM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
libtool
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--prefix=${placeholder "out"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
buildFlags = [
|
||||||
|
"cppcompile"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
for file in "src-first-comment.pl" "src_neaten.pl"; do
|
patchShebangs --build build/src-first-comment.pl build/src_neaten.pl
|
||||||
substituteInPlace "build/$file" \
|
|
||||||
--replace "#!/usr/bin/perl" "#!${perl}/bin/perl"
|
|
||||||
done
|
|
||||||
|
|
||||||
substituteInPlace "build/cpp_install.sh" \
|
substituteInPlace build/cpp_configure.sh \
|
||||||
--replace "sudo " ""
|
--replace-fail "./configure" "./configure $configureFlags"
|
||||||
|
substituteInPlace build/cpp_install.sh \
|
||||||
|
--replace-fail "sudo " ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake ];
|
meta = {
|
||||||
buildInputs = [ perl libtool ];
|
|
||||||
|
|
||||||
makeFlags = [ "prefix=$(out)" "tgz" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://qqwing.com";
|
homepage = "https://qqwing.com";
|
||||||
description = "Sudoku generating and solving software";
|
description = "Sudoku generating and solving software";
|
||||||
|
license = lib.licenses.gpl2Plus;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
maintainers = with lib.maintainers; [ nickcao ];
|
||||||
mainProgram = "qqwing";
|
mainProgram = "qqwing";
|
||||||
license = licenses.gpl2Plus;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
maintainers = [ ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user