# HG changeset patch # User Robin Stumm # Date 1487206664 -3600 # Thu Feb 16 01:57:44 2017 +0100 # Node ID 49fd6f6cf705faaf20dd53355ec08cf36a55561c # Parent 606189d94f9d8b4f8c195e96dddc97784ad0cae2 add shell.nix and default.nix diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -1,10 +1,13 @@ -with import { }; -with rustUnstable; -with ncurses; +{ pkgs ? import {}, + rust ? pkgs.rustPlatform }: -buildRustPackage { +rust.buildRustPackage { name = "cursedlife"; src = ./.; - buildInputs = [ ncurses ]; + buildInputs = with pkgs; [ + ncurses + ]; depsSha256 = ""; + + meta.maintainers = [ "serverkorken@gmail.com" ]; } diff --git a/release.nix b/release.nix new file mode 100644 --- /dev/null +++ b/release.nix @@ -0,0 +1,7 @@ +{ nixpkgs, system }: + +let + pkgs = import nixpkgs { inherit system; }; +in { + build = import ./default.nix { inherit pkgs; }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation { + name = "cursedlife-env"; + buildInputs = with pkgs; [ + ncurses + ]; + + RUST_BACKTRACE = 1; +}