Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ let

# Haskell.nix is delivery as an overlay. Add our own overlay, which
# provides one of our crypto dependencies, in a non-destructive way.
allOverlays = moreOverlays ++ haskellNix.nixpkgsArgs.overlays;
allOverlays = moreOverlays ++ haskellNix.nixpkgsArgs.overlays ++
# And provide a mapping for haskell-nix to make our library available to Cabal.
[(final: prev: {
haskell-nix = prev.haskell-nix // {
extraPkgconfigMappings = prev.haskell-nix.extraPkgconfigMappings or {} // {
"libchallenge_bypass_ristretto_ffi" = [ "libchallenge_bypass_ristretto_ffi" ];
};
};
})];

# Remove runtime dependency on GCC
noGCC = { dontStrip = false; enableShared = false; };
Expand All @@ -24,7 +32,7 @@ let
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
haskellNix.sources.nixpkgs-2205
haskellNix.sources.nixpkgs-2411
# These arguments passed to nixpkgs, include some patches and also
# the haskell.nix functionality itself as an overlay.
(haskellNix.nixpkgsArgs // { overlays = allOverlays; });
Expand Down
20 changes: 10 additions & 10 deletions nix/materialized.paymentserver/.stack-to-nix.cache.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
synopsis = "Helpers for using prometheus with servant";
description = "Helpers for using prometheus with servant. Each endpoint has its own metrics allowing more detailed monitoring than wai-middleware-prometheus allows";
buildType = "Simple";
};
};
components = {
"library" = {
depends = [
Expand All @@ -34,9 +34,9 @@
(hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers"))
(hsPkgs."wai" or (errorHandler.buildDepError "wai"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
];
];
buildable = true;
};
};
exes = {
"bench" = {
depends = [
Expand All @@ -49,10 +49,10 @@
(hsPkgs."wai" or (errorHandler.buildDepError "wai"))
(hsPkgs."warp" or (errorHandler.buildDepError "warp"))
(hsPkgs."process" or (errorHandler.buildDepError "process"))
];
];
buildable = true;
};
};
};
tests = {
"spec" = {
depends = [
Expand All @@ -70,11 +70,11 @@
(hsPkgs."hspec" or (errorHandler.buildDepError "hspec"))
(hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers"))
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
];
];
buildable = true;
};
};
};
} // rec {
src = (pkgs.lib).mkDefault /nix/store/r537z0w0swb6calr6vkk2ppnqd2bgv8z-servant-prometheus-622eb77;
}
};
} // rec {
src = pkgs.lib.mkDefault /nix/store/r537z0w0swb6calr6vkk2ppnqd2bgv8z-servant-prometheus-622eb77;
}
12 changes: 6 additions & 6 deletions nix/materialized.paymentserver/.stack-to-nix.cache.1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
synopsis = "Stripe API for Haskell - Pure Core";
description = "\n<<https://stripe.com/img/navigation/logo@2x.png>>\n\n[Pure API Wrapper]\n`stripe-core` provides a complete binding to the Stripe API. `stripe-core` provides pure wrappers around all the Stripe API objects and methods. `stripe-core` is pure and is not tied to any particular HTTP client library. End users will typically install the `stripe-haskell` package which pulls in the `stripe-http-client` library to obtain a complete set of functionality.";
buildType = "Simple";
};
};
components = {
"library" = {
depends = [
Expand All @@ -33,10 +33,10 @@
(hsPkgs."time" or (errorHandler.buildDepError "time"))
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
(hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers"))
];
];
buildable = true;
};
};
} // rec {
src = (pkgs.lib).mkDefault /nix/store/5np9iplqv5nqcawrwlng38ak0l847nid-stripe-6c340ee/stripe-core;
}
};
} // rec {
src = pkgs.lib.mkDefault /nix/store/5np9iplqv5nqcawrwlng38ak0l847nid-stripe-6c340ee/stripe-core;
}
34 changes: 17 additions & 17 deletions nix/materialized.paymentserver/PaymentServer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
extraSrcFiles = [ "README.rst" ];
extraTmpFiles = [];
extraDocFiles = [];
};
};
components = {
"library" = {
depends = [
Expand Down Expand Up @@ -61,10 +61,10 @@
(hsPkgs."prometheus-client" or (errorHandler.buildDepError "prometheus-client"))
(hsPkgs."servant-prometheus" or (errorHandler.buildDepError "servant-prometheus"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
];
];
pkgconfig = [
(pkgconfPkgs."libchallenge_bypass_ristretto_ffi" or (errorHandler.pkgConfDepError "libchallenge_bypass_ristretto_ffi"))
];
];
buildable = true;
modules = [
"PaymentServer/Processors/Stripe"
Expand All @@ -75,40 +75,40 @@
"PaymentServer/Metrics"
"PaymentServer/Server"
"PaymentServer/Main"
];
];
hsSourceDirs = [ "src" ];
};
};
exes = {
"PaymentServer-exe" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."PaymentServer" or (errorHandler.buildDepError "PaymentServer"))
];
];
buildable = true;
hsSourceDirs = [ "app" ];
mainPath = [ "Main.hs" ];
};
};
"PaymentServer-generate-key" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."PaymentServer" or (errorHandler.buildDepError "PaymentServer"))
];
];
buildable = true;
hsSourceDirs = [ "generate-key" ];
mainPath = [ "Main.hs" ];
};
};
"PaymentServer-get-public-key" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative"))
(hsPkgs."PaymentServer" or (errorHandler.buildDepError "PaymentServer"))
];
];
buildable = true;
hsSourceDirs = [ "get-public-key" ];
mainPath = [ "Main.hs" ];
};
};
"PaymentServer-complete-payment" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
Expand All @@ -121,12 +121,12 @@
(hsPkgs."stripe-concepts" or (errorHandler.buildDepError "stripe-concepts"))
(hsPkgs."raw-strings-qq" or (errorHandler.buildDepError "raw-strings-qq"))
(hsPkgs."PaymentServer" or (errorHandler.buildDepError "PaymentServer"))
];
];
buildable = true;
hsSourceDirs = [ "complete-payment" ];
mainPath = [ "Main.hs" ];
};
};
};
tests = {
"PaymentServer-tests" = {
depends = [
Expand All @@ -153,7 +153,7 @@
(hsPkgs."prometheus-client" or (errorHandler.buildDepError "prometheus-client"))
(hsPkgs."stripe-core" or (errorHandler.buildDepError "stripe-core"))
(hsPkgs."PaymentServer" or (errorHandler.buildDepError "PaymentServer"))
];
];
buildable = true;
modules = [
"Persistence"
Expand All @@ -162,10 +162,10 @@
"Stripe"
"FakeStripe"
"Ristretto"
];
];
hsSourceDirs = [ "test" ];
mainPath = [ "Spec.hs" ];
};
};
};
} // rec { src = (pkgs.lib).mkDefault ./.; }
};
} // rec { src = pkgs.lib.mkDefault ./.; }
10 changes: 5 additions & 5 deletions nix/materialized.paymentserver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
extras = hackage:
{
packages = {
"network" = (((hackage.network)."3.1.2.7").revisions).default;
"stripe-signature" = (((hackage.stripe-signature)."1.0.0.14").revisions).default;
"network" = hackage.network."3.1.2.7".revisions.default;
"stripe-signature" = hackage.stripe-signature."1.0.0.14".revisions.default;
PaymentServer = ./PaymentServer.nix;
servant-prometheus = ./.stack-to-nix.cache.0;
stripe-core = ./.stack-to-nix.cache.1;
};
};
};
resolver = "lts-18.28";
modules = [
({ lib, ... }:
{ packages = {}; })
{ packages = {}; }
({ lib, ... }:
{ planned = lib.mkOverride 900 true; })
];
}
];
}
20 changes: 10 additions & 10 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "4e01f345439c89bc2a5616ceda08a979a01bc15e",
"sha256": "02n3ag3zcig60x93hh9v2vnhyw6qmzr9qg8dpnr4ac4ym8cyifc9",
"rev": "c4e38ee5d48befdc89a2b0b78434f6d98e3458c6",
"sha256": "1186k1m3pwkirwv5fav1yx03nj7ic6jbl139370cdya15db36c1x",
"type": "tarball",
"url": "https://github.com/input-output-hk/haskell.nix/archive/4e01f345439c89bc2a5616ceda08a979a01bc15e.tar.gz",
"url": "https://github.com/input-output-hk/haskell.nix/archive/c4e38ee5d48befdc89a2b0b78434f6d98e3458c6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"libchallenge_bypass_ristretto_ffi": {
Expand All @@ -29,22 +29,22 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "e0ca65c81a2d7a4d82a189f1e23a48d59ad42070",
"sha256": "1pq9nh1d8nn3xvbdny8fafzw87mj7gsmp6pxkdl65w2g18rmcmzx",
"rev": "e2f66fe558481d6b569358d27db06f7e972ed71b",
"sha256": "1xn822jajags6bigdr1ssxvfiyd7d3adhnmmrr9x3maphchkr0x0",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad42070.tar.gz",
"url": "https://github.com/nmattia/niv/archive/e2f66fe558481d6b569358d27db06f7e972ed71b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-21.11",
"branch": "nixos-24.11",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "573095944e7c1d58d30fc679c81af63668b54056",
"sha256": "07s5cwhskqvy82b4rld9b14ljc0013pig23i3jx3l3f957rk95pg",
"rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
"sha256": "0lc189m0s912qyzhqrd08rn7gvlxv9xlp8pfkr2wg18h93ng1fki",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/573095944e7c1d58d30fc679c81af63668b54056.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/04ef94c4c1582fd485bbfdb8c4a8ba250e359195.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
Loading