diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..8b681a9 --- /dev/null +++ b/default.nix @@ -0,0 +1,18 @@ +{ ... }: +let + sources = import ./nix/sources.nix; + nixpkgs = import sources.nixpkgs { }; + gitignore = import sources.gitignore { }; +in with nixpkgs; +stdenv.mkDerivation { + name = "notes"; + src = gitignore.gitignoreSource ./.; + + buildInputs = [ elmPackages.elm ninja nodePackages.uglify-js ]; + buildPhase = '' + ./script/ninja.sh > build.ninja + env ELM_HOME=.elm ninja + ''; + + installPhase = "cp -r dist/ $out/"; +} diff --git a/nix/sources.json b/nix/sources.json index 45710de..4390226 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,4 +1,16 @@ { + "gitignore": { + "branch": "master", + "description": "Nix function for filtering local git sources", + "homepage": "", + "owner": "hercules-ci", + "repo": "gitignore", + "rev": "00b237fb1813c48e20ee2021deb6f3f03843e9e4", + "sha256": "186pvp1y5fid8mm8c7ycjzwzhv7i6s3hh33rbi05ggrs7r3as3yy", + "type": "tarball", + "url": "https://github.com/hercules-ci/gitignore/archive/00b237fb1813c48e20ee2021deb6f3f03843e9e4.tar.gz", + "url_template": "https://github.com///archive/.tar.gz" + }, "niv": { "branch": "master", "description": "Easy dependency management for Nix projects",