bisc/default.nix

35 lines
1.0 KiB
Nix
Raw Normal View History

2019-03-25 00:02:38 +01:00
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
2018-09-21 21:34:31 +02:00
let
inherit (nixpkgs) pkgs;
2019-03-25 00:02:38 +01:00
f = { mkDerivation, base, configurator, directory, filepath, mtl
2019-06-26 10:21:01 +02:00
, selda, selda-sqlite, stdenv, text
2019-03-25 00:02:38 +01:00
}:
mkDerivation {
pname = "bisc";
2019-06-26 10:21:01 +02:00
version = "0.2.1.0";
2019-03-25 00:02:38 +01:00
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
base configurator directory filepath mtl selda selda-sqlite text
];
2019-06-26 10:21:01 +02:00
homepage = "https://maxwell.ydns.eu/git/rnhmjoj/bisc";
2019-03-25 00:02:38 +01:00
description = "A small tool that clears qutebrowser cookies";
license = stdenv.lib.licenses.gpl3;
};
haskellPackages = 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 (haskellPackages.callPackage f {});
2018-09-21 21:34:31 +02:00
in
if pkgs.lib.inNixShell then drv.env else drv