nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildNpmPackage,
4 fetchFromGitHub,
5 elmPackages,
6}:
7
8buildNpmPackage (finalAttrs: {
9 pname = "elm-graphql";
10 version = "4.3.2-beta.0";
11
12 src = fetchFromGitHub {
13 owner = "dillonkearns";
14 repo = "elm-graphql";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-Wfp21QINwj93490XmdH1LUg8LSi44EupuDH+61srZL8=";
17 };
18
19 postPatch = ''
20 substituteInPlace package.json \
21 --replace-fail "elm-tooling install" "true"
22 '';
23
24 npmDepsHash = "sha256-Fx0ylqXHdu48mZSMtedyLyb4+Ssn4DrQ34pTJAy2x7c=";
25
26 nativeBuildInputs = [
27 elmPackages.elm
28 ];
29
30 npmFlags = [ "--ignore-scripts" ];
31
32 postConfigure = (
33 elmPackages.fetchElmDeps {
34 elmPackages = import ./elm-srcs.nix;
35 elmVersion = elmPackages.elm.version;
36 registryDat = ./registry.dat;
37 }
38 );
39
40 passthru.updateScript = ./update.sh;
41
42 meta = {
43 description = "Autogenerate type-safe GraphQL queries in Elm";
44 homepage = "https://github.com/dillonkearns/elm-graphql";
45 license = lib.licenses.bsd3;
46 maintainers = with lib.maintainers; [ pyrox0 ];
47 mainProgram = "elm-graphql";
48 };
49})