mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
2048-cli: 0.9.1 -> unstable-2019-12-10
This commit is contained in:
parent
93aba2c96d
commit
f445f928f4
@ -1,24 +1,22 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, SDL2
|
, gettext
|
||||||
, SDL2_ttf
|
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, ncurses
|
, ncurses
|
||||||
, pkg-config
|
|
||||||
, ui ? "terminal"
|
, ui ? "terminal"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert lib.elem ui [ "terminal" "curses" "sdl" ];
|
assert lib.elem ui [ "terminal" "curses" ];
|
||||||
stdenv.mkDerivation (self: {
|
stdenv.mkDerivation (self: {
|
||||||
pname = "2048-cli";
|
pname = "2048-cli";
|
||||||
version = "0.9.1";
|
version = "unstable-2019-12-10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tiehuis";
|
owner = "tiehuis";
|
||||||
repo = "2048-cli";
|
repo = "2048-cli";
|
||||||
rev = "v${self.version}";
|
rev = "67439255df7d4f70209ca628d65128cd41d33e8d";
|
||||||
hash = "sha256-pLOrUilIrA+wo3iePhSXSK1UhbcjKyAx4SpKcC0I2yY=";
|
hash = "sha256-U7g2wCZgR7Lp/69ktQIZZ1cScll2baCequemTl3Mc3I=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -28,16 +26,16 @@ stdenv.mkDerivation (self: {
|
|||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
pkg-config
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [
|
||||||
(lib.optional (ui == "curses") ncurses)
|
gettext
|
||||||
++ (lib.optionals (ui == "sdl") [ SDL2 SDL2_ttf ]);
|
]
|
||||||
|
++ (lib.optional (ui == "curses") ncurses);
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = lib.optionalString (ui == "sdl") "-I${SDL2_ttf}/include/SDL2";
|
NIX_CFLAGS_COMPILE="-I${lib.getDev gettext}/share/gettext/";
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"CC=${stdenv.cc.targetPrefix}cc"
|
"CC=${stdenv.cc.targetPrefix}cc"
|
||||||
@ -48,7 +46,7 @@ stdenv.mkDerivation (self: {
|
|||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm755 -t $out/bin 2048
|
install -Dm755 -t $out/bin 2048
|
||||||
installManPage man/2048.1
|
installManPage man/2048.6
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
@ -59,6 +57,5 @@ stdenv.mkDerivation (self: {
|
|||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = [ lib.maintainers.AndersonTorres ];
|
maintainers = [ lib.maintainers.AndersonTorres ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
broken = (ui == "sdl"); # segmentation fault
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -34743,13 +34743,12 @@ with pkgs;
|
|||||||
|
|
||||||
_1oom = callPackage ../games/1oom { };
|
_1oom = callPackage ../games/1oom { };
|
||||||
|
|
||||||
_2048-in-terminal = callPackage ../games/2048-in-terminal { };
|
|
||||||
|
|
||||||
_2048-cli = _2048-cli-terminal;
|
_2048-cli = _2048-cli-terminal;
|
||||||
_2048-cli-curses = callPackage ../games/2048-cli { ui = "curses"; };
|
_2048-cli-curses = callPackage ../games/2048-cli { ui = "curses"; };
|
||||||
_2048-cli-sdl = callPackage ../games/2048-cli { ui = "sdl"; };
|
|
||||||
_2048-cli-terminal = callPackage ../games/2048-cli { ui = "terminal"; };
|
_2048-cli-terminal = callPackage ../games/2048-cli { ui = "terminal"; };
|
||||||
|
|
||||||
|
_2048-in-terminal = callPackage ../games/2048-in-terminal { };
|
||||||
|
|
||||||
_20kly = callPackage ../games/20kly { };
|
_20kly = callPackage ../games/20kly { };
|
||||||
|
|
||||||
_90secondportraits = callPackage ../games/90secondportraits { love = love_0_10; };
|
_90secondportraits = callPackage ../games/90secondportraits { love = love_0_10; };
|
||||||
|
Loading…
Reference in New Issue
Block a user