From 950908b6a0ef46934f9fe91e8e38323e27caa801 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 8 Dec 2015 12:01:39 +0100 Subject: nix expressions --- .gitignore | 1 + RCade.nix | 23 +++++++++++++++++++++++ default.nix | 5 +++++ 3 files changed, 29 insertions(+) create mode 100644 RCade.nix create mode 100644 default.nix diff --git a/.gitignore b/.gitignore index 94b8e6e..847d7df 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ old releases save/** Game .depend +result diff --git a/RCade.nix b/RCade.nix new file mode 100644 index 0000000..ec21960 --- /dev/null +++ b/RCade.nix @@ -0,0 +1,23 @@ +{ stdenv +, SDL +, SDL_ttf +, SDL_image +, SDL_gfx +, SDL_mixer +}: + +stdenv.mkDerivation { + name = "RCade"; + src = ./.; + + buildInputs = [ SDL SDL_ttf SDL_image SDL_gfx SDL_mixer ]; + + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL}/include/SDL" + ''; + + installPhase = '' + mkdir -p $out/bin + install -m 555 Game $out/bin + ''; +} diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..bb7d239 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import {} }: + +{ + RCade = pkgs.callPackage ./RCade.nix {}; +} -- cgit v1.2.3