aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/libraries/agda/generic/default.nix
blob: 1287e08bda1da37e2c686139ff6587e82abca2bc (plain)
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
{ lib, mkDerivation, fetchFromGitHub, standard-library }:

mkDerivation rec {
  pname = "generic";
  version = "0.1";

  src = fetchFromGitHub {
    repo = "Generic";
    owner = "effectfully";
    rev = "v${version}";
    sha256 = "121121rg3daaqp91845fbyws6g28hyj1ywmh12n54r3nicb35g5q";
  };

  buildInputs = [
    standard-library
  ];

  preBuild = ''
    echo "module Everything where" > Everything.agda
	  find src -name '*.agda' | sed -e 's/src\///;s/\//./g;s/\.agda$//;s/^/import /' >> Everything.agda
  '';

  meta = with lib; {
    description =
      "A library for doing generic programming in Agda";
    homepage = src.meta.homepage;
    license = licenses.mit;
    platforms = platforms.unix;
    maintainers = with maintainers; [ alexarice turion ];
  };
}