diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2021-01-02 14:06:16 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2021-01-23 17:01:15 -0500 |
commit | 4437c10fad8925d6322c83bf1553daa9a36ceb31 (patch) | |
tree | 6d5a85e7d5da7d41320a9773bb8830ef4908e3df /project.nix | |
parent | nix shebangs, consider (diff) |
nix, work on build
Diffstat (limited to 'project.nix')
-rwxr-xr-x[-rw-r--r--] | project.nix | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/project.nix b/project.nix index 9b335e3..1877443 100644..100755 --- a/project.nix +++ b/project.nix @@ -1,14 +1,40 @@ +#!/usr/bin/env -S nix-build { pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv, }: -with import ./mkDub.nix { inherit pkgs; }; +with import ./nix/mkDub.nix { inherit pkgs; }; mkDubDerivation rec { name = "spine-${version}"; version = "0.11.1"; src = ./.; buildInputs = [ pkgs.sqlite + ( + let + dub2nix-src = fetchTarball { + url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; + }; + dub2nix = (import dub2nix-src) { inherit pkgs; }; + in + with pkgs; [ + nixFlakes + dub + ldc + sqlite + nix-prefetch-git + validatePkgConfig + ] + ) ]; + shellHook = '' + # nix-build -I nixpkgs=<provide local nix path> + nix-build + echo "built spine" + ''; + installPhase = '' + install -m755 -D spine $out/bin/spine + echo "built $out/bin/spine" + ''; meta = with stdenv.lib; { homepage = http://sisudoc.org; description = "a sisu like document parser"; |