diff --git a/README.rst b/README.rst index 7bd9f0fcabc91d6d95351893d5e0da3da653ca77..74ee0105f653f055785a43ab5be46d3721787070 100644 --- a/README.rst +++ b/README.rst @@ -8,9 +8,9 @@ Building The build system uses `Nix`_ which must be installed before anything can be built. Builds are tested against a particular nixpkgs revision. -Start by exporting ``NIX_PATH`` to ensure you use the same revision:: +Start by setting up the development/operations environment:: - $ export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/$(cat nixpkgs.rev).tar.gz + $ nix-shell Documentation ~~~~~~~~~~~~~ diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000000000000000000000000000000000000..c9773565cfcb74c153bfb0fcfa0d2c712d1dc9d4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import <nixpkgs> { } }: +let + nixpkgs-rev = builtins.readFile ./nixpkgs.rev; + morph-src = pkgs.fetchFromGitHub { + owner = "DBCDK"; + repo = "morph"; + rev = "v1.4.0"; + hash = "sha256:1y6clzi8sfnrv4an26b44r24nnxds1kj9aw3lmjbgxl9yrxxsj1k"; + }; + morph = pkgs.callPackage (morph-src + "/nix-packaging") { }; +in +pkgs.mkShell { + NIX_PATH = "nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/${nixpkgs-rev}.tar.gz"; + + buildInputs = [ + morph + ]; +}