2021-05-11 16:44:43 +02:00
|
|
|
{ nixpkgs ? <nixpkgs>
|
|
|
|
, static ? false
|
|
|
|
, compiler ? "default"
|
|
|
|
, doBenchmark ? false
|
|
|
|
, system ? builtins.currentSystem
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
basepkgs = import nixpkgs { inherit system; };
|
|
|
|
pkgs = if static then basepkgs.pkgsStatic else basepkgs.pkgs;
|
|
|
|
|
|
|
|
f = { mkDerivation, base, bytestring, configurator, data-default
|
|
|
|
, directory, exceptions, filepath, leveldb-haskell, mtl, selda
|
2021-09-06 00:02:14 +02:00
|
|
|
, selda-sqlite, lib, text, optparse-applicative
|
2021-05-11 16:44:43 +02:00
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "bisc";
|
|
|
|
version = "0.3.0.0";
|
|
|
|
src = ./.;
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
|
|
|
executableHaskellDepends = [
|
|
|
|
base bytestring configurator data-default directory exceptions
|
|
|
|
filepath leveldb-haskell mtl selda selda-sqlite text
|
2021-09-06 00:02:14 +02:00
|
|
|
optparse-applicative
|
2021-05-11 16:44:43 +02:00
|
|
|
];
|
2021-05-12 08:43:18 +02:00
|
|
|
executableSystemDepends = [ pkgs.snappy ];
|
2021-05-11 16:44:43 +02:00
|
|
|
buildFlags = lib.optionals static [
|
|
|
|
"--ld-option=-lstdc++"
|
|
|
|
"--ld-option=-lsnappy"
|
|
|
|
];
|
|
|
|
homepage = "https://maxwell.ydns.eu/git/rnhmjoj/bisc";
|
|
|
|
description = "A small tool that clears cookies (and more)";
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
};
|
|
|
|
|
|
|
|
ghc = if static then pkgs.haskell.packages.integer-simple.ghc8104
|
|
|
|
else if compiler == "default" then pkgs.haskellPackages
|
|
|
|
else pkgs.haskell.packages.${compiler};
|
|
|
|
|
|
|
|
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
|
|
|
|
|
|
|
|
drv = variant (ghc.callPackage f {});
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
if pkgs.lib.inNixShell then drv.env else drv
|