Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, cmake, SDL, qt4 }:
|
|
|
|
let mirror = "http://download.holdingnuts.net";
|
|
in stdenv.mkDerivation rec {
|
|
pname = "holdingnuts";
|
|
version = "0.0.5";
|
|
|
|
src = fetchurl {
|
|
url = "${mirror}/release/${version}/${pname}-${version}.tar.bz2";
|
|
sha256 = "0iw25jmnqzscg34v66d4zz70lvgjp4l7gi16nna6491xnqha5a8g";
|
|
};
|
|
|
|
patches = [
|
|
(fetchurl {
|
|
url = "${mirror}/patches/holdingnuts-0.0.5-wheel.patch";
|
|
sha256 = "0hap5anxgc19s5qi64mjpi3wpgphy4dqdxqw34q19dw3gwxw5g8n";
|
|
})
|
|
(fetchurl {
|
|
url = "${mirror}/patches/holdingnuts-qpixmapcache-workaround.patch";
|
|
sha256 = "15cf9j9mdm85f0h7w5f5852ic7xpim0243yywkd2qrfp37mi93pd";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/system/SysAccess.c --replace /usr/share $out/share
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ SDL qt4 ];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.holdingnuts.net/";
|
|
description = "Open Source Poker client and server";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ obadz ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|