add nix packaging

master
Brian Hicks 2020-05-14 16:45:17 -05:00
parent e5d22673f3
commit 48f4f4bd10
2 changed files with 30 additions and 0 deletions

18
default.nix Normal file
View File

@ -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/";
}

View File

@ -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/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",