about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/qqwing/default.nix
blob: 81a10b9ea2afecab2dcda379cac6fbb77c261e9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchFromGitHub, perl, autoconf, automake, libtool }:

stdenv.mkDerivation rec {
  pname = "qqwing";
  version = "1.3.4";

  src = fetchFromGitHub {
    owner = "stephenostermiller";
    repo = "qqwing";
    rev = "v${version}";
    sha256 = "1qq0vi4ch4y3a5fb1ncr0yzkj3mbvdiwa3d51qpabq94sh0cz09i";
  };

  postPatch = ''
    for file in "src-first-comment.pl" "src_neaten.pl"; do
      substituteInPlace "build/$file" \
        --replace "#!/usr/bin/perl" "#!${perl}/bin/perl"
    done

    substituteInPlace "build/cpp_install.sh" \
      --replace "sudo " ""
  '';

  nativeBuildInputs = [ autoconf automake ];
  buildInputs = [ perl libtool ];

  makeFlags = [ "prefix=$(out)" "tgz" ];

  meta = with lib; {
    homepage = "https://qqwing.com";
    description = "Sudoku generating and solving software";
    license = licenses.gpl2;
    platforms = platforms.unix;
    maintainers = with maintainers; [ ];
  };
}