package with nix

This commit is contained in:
Primrose 2026-02-01 16:54:48 +01:00
parent 46f265557a
commit b8c4551440
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 20 additions and 2 deletions

View file

@ -1,10 +1,28 @@
{ {
lib,
haskellPackages, haskellPackages,
haskell, haskell,
symlinkJoin,
makeWrapper,
sane-backends, # scanimage
poppler-utils, # mergepdf
}: }:
let let
inherit (haskell.lib.compose) justStaticExecutables; inherit (haskell.lib.compose) justStaticExecutables;
drv = haskellPackages.callCabal2nix "easyscan" ./src { }; drv = haskellPackages.callCabal2nix "easyscan" ./src { };
in in
justStaticExecutables drv symlinkJoin {
name = "easyscan";
paths = [ (justStaticExecutables drv) ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/easyscan \
--prefix PATH : "${
lib.makeBinPath [
sane-backends
poppler-utils
]
}"
'';
}

View file

@ -14,7 +14,7 @@ common common
build-depends: base build-depends: base
default-language: Haskell2010 default-language: Haskell2010
executable manage executable easyscan
import: common import: common
main-is: ./Main.hs main-is: ./Main.hs
build-depends: build-depends: