about summary refs log tree commit diff
path: root/users/Profpatsch/httzip/default.nix
blob: 35d8a69d5638db56ec6361f6db35197901c0aa84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ depot, pkgs, lib, ... }:

let

  httzip = pkgs.haskellPackages.mkDerivation {
    pname = "httzip";
    version = "0.1.0";

    src = depot.users.Profpatsch.exactSource ./. [
      ./httzip.cabal
      ./Httzip.hs
    ];

    libraryHaskellDepends = [
      pkgs.haskellPackages.pa-prelude
      pkgs.haskellPackages.warp
      pkgs.haskellPackages.wai
      pkgs.haskellPackages.wai-conduit
      pkgs.haskellPackages.conduit-extra
      pkgs.haskellPackages.conduit
    ];

    isExecutable = true;
    isLibrary = false;
    license = lib.licenses.mit;
  };

  bins = depot.nix.getBins httzip [ "httzip" ];

in
depot.nix.writeExecline "httzip-wrapped" { } [
  "importas"
  "-i"
  "PATH"
  "PATH"
  "export"
  "PATH"
  "${pkgs.zip}/bin:$${PATH}"
  bins.httzip
]