From 4437c10fad8925d6322c83bf1553daa9a36ceb31 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Jan 2021 14:06:16 -0500 Subject: nix, work on build --- project.nix | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) mode change 100644 => 100755 project.nix (limited to 'project.nix') diff --git a/project.nix b/project.nix old mode 100644 new mode 100755 index 9b335e3..1877443 --- a/project.nix +++ b/project.nix @@ -1,14 +1,40 @@ +#!/usr/bin/env -S nix-build { pkgs ? import {}, 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= + 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"; -- cgit v1.2.3