make nix-build work
parent
76f06ea15d
commit
7a9357fe60
|
@ -1,2 +1,3 @@
|
|||
elm-stuff
|
||||
index.html
|
||||
result
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{ sources ? import ./nix/sources.nix { }, nixpkgs ? import sources.nixpkgs { }
|
||||
}:
|
||||
let gitignore = nixpkgs.callPackage sources.gitignore { };
|
||||
in nixpkgs.stdenv.mkDerivation {
|
||||
name = "bad-datalog";
|
||||
|
||||
src = gitignore.gitignoreSource ./.;
|
||||
buildInputs = [ nixpkgs.elmPackages.elm ];
|
||||
|
||||
buildPhase = nixpkgs.elmPackages.fetchElmDeps {
|
||||
elmPackages = import ./nix/elm-srcs.nix;
|
||||
elmVersion = "0.19.1";
|
||||
registryDat = ./nix/registry.dat;
|
||||
};
|
||||
|
||||
# it's a little weird that elm2nix says it's fine to build in the install
|
||||
# phase, but who am I to judge?
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/bad-datalog
|
||||
|
||||
(
|
||||
cd sample-app
|
||||
elm make src/Main.elm --output $out/share/bad-datalog/index.html
|
||||
)
|
||||
'';
|
||||
}
|
|
@ -1,4 +1,16 @@
|
|||
{
|
||||
"gitignore": {
|
||||
"branch": "master",
|
||||
"description": "Nix function for filtering local git sources",
|
||||
"homepage": "",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore",
|
||||
"rev": "211907489e9f198594c0eb0ca9256a1949c9d412",
|
||||
"sha256": "06j7wpvj54khw0z10fjyi31kpafkr6hi1k0di13k1xp8kywvfyx8",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/hercules-ci/gitignore/archive/211907489e9f198594c0eb0ca9256a1949c9d412.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"niv": {
|
||||
"branch": "master",
|
||||
"description": "Easy dependency management for Nix projects",
|
||||
|
|
Reference in New Issue