Skip to content

Commit

Permalink
add nix packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed May 14, 2020
1 parent e5d2267 commit 48f4f4b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions 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/";
}
12 changes: 12 additions & 0 deletions 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/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",
Expand Down

0 comments on commit 48f4f4b

Please sign in to comment.