summaryrefslogtreecommitdiff
path: root/default.nix
blob: 0a9f8b6959c6151f0147ce97324432ce655e492c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{pkgs ? import <nixpkgs> {}}:
with pkgs; let
  ghc = haskellPackages.ghcWithPackages (ps:
    with ps; [
      lens-aeson
      wreq
      sqlite-simple
      PyF
      optparse-applicative
    ]);
in
  stdenv.mkDerivation {
    name = "mavedb-scraper";
    src = ./src;

    buildInputs = [ghc];

    buildPhase = ''
      ghc -o scrape *.hs -O -rtsopts -threaded
    '';

    installPhase = "install -Dm755 ./scrape $out/bin/scrape";
  }