summaryrefslogtreecommitdiffhomepage
path: root/derivation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'derivation.nix')
-rw-r--r--derivation.nix35
1 files changed, 17 insertions, 18 deletions
diff --git a/derivation.nix b/derivation.nix
index b53e408..42605bc 100644
--- a/derivation.nix
+++ b/derivation.nix
@@ -7,15 +7,13 @@
}:
assert dcompiler != null;
with (
- assert dcompiler != null;
with lib;
let
- # Filter function to remove the .dub package folder from src
- filterDub = name: type: let baseName = baseNameOf (toString name); in ! (
+ filterDub = name: type: let baseName = baseNameOf (toString name); in ! ( # filter function to remove the .dub package folder from src
type == "directory" && baseName == ".dub"
);
targetOf = package: "${package.targetPath or "."}/${package.targetName or package.name}";
- # Remove reference to build tools and library sources
+ # remove reference to build tools and library sources
disallowedReferences = deps: [ dcompiler dub ];
removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}'';
in {
@@ -42,24 +40,25 @@ with (
'';
buildPhase = ''
runHook preBuild
- export HOME=$PWD
- for dc_ in dmd ldmd2 gdmd; do
- echo "- check for D compiler $dc_"
- dc=$(type -P $dc_ || echo "")
- if [ ! "$dc" == "" ]; then
+ HOME="$PWD"
+ DFLAGS="-O2 -inline"
+ for DC_ in dmd ldmd2 gdmd; do
+ echo "- check for D compiler $DC_"
+ DC=$(type -P $DC_ || echo "")
+ if [ ! "$DC" == "" ]; then
break
fi
done
- if [ "$dc" == "" ]; then
+ if [ "$DC" == "" ]; then
exit "Error: could not find D compiler"
fi
- echo "$dc_ used as D compiler to build $pname"
- dub build --compiler=$dc --build=release --combined --skip-registry=all
+ echo "$DC_ used as D compiler to build $pname"
+ dub build --compiler=$DC --build=release --combined --skip-registry=all
runHook postBuild
'';
checkPhase = ''
runHook preCheck
- export HOME=$PWD
+ HOME="$PWD"
dub test --combined --skip-registry=all
runHook postCheck
'';
@@ -83,9 +82,9 @@ with (
}
);
mkDubDerivation rec {
- name = "spine-search-${version}";
- version = "0.12.0";
- src = ./.;
+ name = "spine-search-${version}";
+ #version = "0.12.0";
+ src = ./.;
buildInputs = [
pkgs.sqlite (
with pkgs; [
@@ -110,9 +109,9 @@ mkDubDerivation rec {
homepage = "https://sisudoc.org";
description = "cgi sqlite search form for document object search";
longDescription = ''
- A sisu like parser and document generator
- ...
+ a sisu like parser and document generator
'';
+ homepage = "https://sisudoc.org";
license = licenses.agpl3Plus;
platforms = platforms.linux;
maintainers = [ "RalphAmissah" ];