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