Use haskell.nix.

This commit is contained in:
Andreas Ländle 2026-02-01 10:00:12 +01:00
parent 6f69324bb7
commit c7a6f8a33e
13 changed files with 682 additions and 378 deletions

View File

@ -1,5 +1,105 @@
{
"nodes": {
"HTTP": {
"flake": false,
"locked": {
"lastModified": 1451647621,
"narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=",
"owner": "phadej",
"repo": "HTTP",
"rev": "9bc0996d412fef1787449d841277ef663ad9a915",
"type": "github"
},
"original": {
"owner": "phadej",
"repo": "HTTP",
"type": "github"
}
},
"cabal-32": {
"flake": false,
"locked": {
"lastModified": 1603716527,
"narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=",
"owner": "haskell",
"repo": "cabal",
"rev": "48bf10787e27364730dd37a42b603cee8d6af7ee",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.2",
"repo": "cabal",
"type": "github"
}
},
"cabal-34": {
"flake": false,
"locked": {
"lastModified": 1645834128,
"narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=",
"owner": "haskell",
"repo": "cabal",
"rev": "5ff598c67f53f7c4f48e31d722ba37172230c462",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.4",
"repo": "cabal",
"type": "github"
}
},
"cabal-36": {
"flake": false,
"locked": {
"lastModified": 1669081697,
"narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=",
"owner": "haskell",
"repo": "cabal",
"rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.6",
"repo": "cabal",
"type": "github"
}
},
"cardano-shell": {
"flake": false,
"locked": {
"lastModified": 1608537748,
"narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=",
"owner": "input-output-hk",
"repo": "cardano-shell",
"rev": "9392c75087cb9a3d453998f4230930dea3a95725",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "cardano-shell",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1672831974,
"narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=",
"owner": "input-output-hk",
"repo": "flake-compat",
"rev": "45f2638735f8cdc40fe302742b79f248d23eb368",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "hkm/gitlab-fix",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -18,24 +118,533 @@
"type": "github"
}
},
"nixpkgs": {
"hackage": {
"flake": false,
"locked": {
"lastModified": 1738136902,
"narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c",
"lastModified": 1769820239,
"narHash": "sha256-1J42SI3pfBRXDtZ5gOzG/CbM0wCeczX0inq9JmZHAvE=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "6d5018203bd633bb8c2c81504e672845a5e88320",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "input-output-hk",
"repo": "hackage.nix",
"type": "github"
}
},
"hackage-for-stackage": {
"flake": false,
"locked": {
"lastModified": 1769819484,
"narHash": "sha256-MsIhv/bfr8MAVf5ypKSFVofVoK3UL3t8N1PfNqqwuyg=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "dc715cfc9786c7fe743d309b7f5d873b666f357a",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "for-stackage",
"repo": "hackage.nix",
"type": "github"
}
},
"hackage-internal": {
"flake": false,
"locked": {
"lastModified": 1750307553,
"narHash": "sha256-iiafNoeLHwlSLQTyvy8nPe2t6g5AV4PPcpMeH/2/DLs=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "f7867baa8817fab296528f4a4ec39d1c7c4da4f3",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "hackage.nix",
"type": "github"
}
},
"haskellNix": {
"inputs": {
"HTTP": "HTTP",
"cabal-32": "cabal-32",
"cabal-34": "cabal-34",
"cabal-36": "cabal-36",
"cardano-shell": "cardano-shell",
"flake-compat": "flake-compat",
"hackage": "hackage",
"hackage-for-stackage": "hackage-for-stackage",
"hackage-internal": "hackage-internal",
"hls": "hls",
"hls-1.10": "hls-1.10",
"hls-2.0": "hls-2.0",
"hls-2.10": "hls-2.10",
"hls-2.11": "hls-2.11",
"hls-2.12": "hls-2.12",
"hls-2.2": "hls-2.2",
"hls-2.3": "hls-2.3",
"hls-2.4": "hls-2.4",
"hls-2.5": "hls-2.5",
"hls-2.6": "hls-2.6",
"hls-2.7": "hls-2.7",
"hls-2.8": "hls-2.8",
"hls-2.9": "hls-2.9",
"hpc-coveralls": "hpc-coveralls",
"iserv-proxy": "iserv-proxy",
"nixpkgs": [
"haskellNix",
"nixpkgs-unstable"
],
"nixpkgs-2305": "nixpkgs-2305",
"nixpkgs-2311": "nixpkgs-2311",
"nixpkgs-2405": "nixpkgs-2405",
"nixpkgs-2411": "nixpkgs-2411",
"nixpkgs-2505": "nixpkgs-2505",
"nixpkgs-2511": "nixpkgs-2511",
"nixpkgs-unstable": "nixpkgs-unstable",
"old-ghc-nix": "old-ghc-nix",
"stackage": "stackage"
},
"locked": {
"lastModified": 1769820751,
"narHash": "sha256-5awWVACKBL0S8+MYGnDVv5AHJhS7auSd4C4xZkjM+5c=",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "dc0cc7ec133d392fdd15b07275994577220cd8d5",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "haskell.nix",
"type": "github"
}
},
"hls": {
"flake": false,
"locked": {
"lastModified": 1741604408,
"narHash": "sha256-tuq3+Ip70yu89GswZ7DSINBpwRprnWnl6xDYnS4GOsc=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "682d6894c94087da5e566771f25311c47e145359",
"type": "github"
},
"original": {
"owner": "haskell",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-1.10": {
"flake": false,
"locked": {
"lastModified": 1680000865,
"narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "1.10.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.0": {
"flake": false,
"locked": {
"lastModified": 1687698105,
"narHash": "sha256-OHXlgRzs/kuJH8q7Sxh507H+0Rb8b7VOiPAjcY9sM1k=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "783905f211ac63edf982dd1889c671653327e441",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.0.0.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.10": {
"flake": false,
"locked": {
"lastModified": 1743069404,
"narHash": "sha256-q4kDFyJDDeoGqfEtrZRx4iqMVEC2MOzCToWsFY+TOzY=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "2318c61db3a01e03700bd4b05665662929b7fe8b",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.10.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.11": {
"flake": false,
"locked": {
"lastModified": 1747306193,
"narHash": "sha256-/MmtpF8+FyQlwfKHqHK05BdsxC9LHV70d/FiMM7pzBM=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "46ef4523ea4949f47f6d2752476239f1c6d806fe",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.11.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.12": {
"flake": false,
"locked": {
"lastModified": 1758709460,
"narHash": "sha256-xkI8MIIVEVARskfWbGAgP5sHG/lyeKnkm0LIOJ19X5w=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "7d983de4fa7ff54369f6dd31444bdb9869aec83e",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.12.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.2": {
"flake": false,
"locked": {
"lastModified": 1693064058,
"narHash": "sha256-8DGIyz5GjuCFmohY6Fa79hHA/p1iIqubfJUTGQElbNk=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "b30f4b6cf5822f3112c35d14a0cba51f3fe23b85",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.2.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.3": {
"flake": false,
"locked": {
"lastModified": 1695910642,
"narHash": "sha256-tR58doOs3DncFehHwCLczJgntyG/zlsSd7DgDgMPOkI=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "458ccdb55c9ea22cd5d13ec3051aaefb295321be",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.3.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.4": {
"flake": false,
"locked": {
"lastModified": 1699862708,
"narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.4.0.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.5": {
"flake": false,
"locked": {
"lastModified": 1701080174,
"narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "27f8c3d3892e38edaef5bea3870161815c4d014c",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.5.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.6": {
"flake": false,
"locked": {
"lastModified": 1705325287,
"narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.6.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.7": {
"flake": false,
"locked": {
"lastModified": 1708965829,
"narHash": "sha256-LfJ+TBcBFq/XKoiNI7pc4VoHg4WmuzsFxYJ3Fu+Jf+M=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "50322b0a4aefb27adc5ec42f5055aaa8f8e38001",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.7.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.8": {
"flake": false,
"locked": {
"lastModified": 1715153580,
"narHash": "sha256-Vi/iUt2pWyUJlo9VrYgTcbRviWE0cFO6rmGi9rmALw0=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "dd1be1beb16700de59e0d6801957290bcf956a0a",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.8.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.9": {
"flake": false,
"locked": {
"lastModified": 1719993701,
"narHash": "sha256-wy348++MiMm/xwtI9M3vVpqj2qfGgnDcZIGXw8sF1sA=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "90319a7e62ab93ab65a95f8f2bcf537e34dae76a",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.9.0.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"hpc-coveralls": {
"flake": false,
"locked": {
"lastModified": 1607498076,
"narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=",
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
"type": "github"
},
"original": {
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"type": "github"
}
},
"iserv-proxy": {
"flake": false,
"locked": {
"lastModified": 1755243078,
"narHash": "sha256-GLbl1YaohKdpzZVJFRdcI1O1oE3F3uBer4lFv3Yy0l8=",
"owner": "stable-haskell",
"repo": "iserv-proxy",
"rev": "150605195cb7183a6fb7bed82f23fedf37c6f52a",
"type": "github"
},
"original": {
"owner": "stable-haskell",
"ref": "iserv-syms",
"repo": "iserv-proxy",
"type": "github"
}
},
"nixpkgs-2305": {
"locked": {
"lastModified": 1705033721,
"narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-23.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2311": {
"locked": {
"lastModified": 1719957072,
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-23.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2405": {
"locked": {
"lastModified": 1735564410,
"narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-24.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2411": {
"locked": {
"lastModified": 1751290243,
"narHash": "sha256-kNf+obkpJZWar7HZymXZbW+Rlk3HTEIMlpc6FCNz0Ds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5ab036a8d97cb9476fbe81b09076e6e91d15e1b6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-24.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2505": {
"locked": {
"lastModified": 1764560356,
"narHash": "sha256-M5aFEFPppI4UhdOxwdmceJ9bDJC4T6C6CzCK1E2FZyo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c8f0cca84510cc79e09ea99a299c9bc17d03cb6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-25.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2511": {
"locked": {
"lastModified": 1764572236,
"narHash": "sha256-hLp6T/vKdrBQolpbN3EhJOKTXZYxJZPzpnoZz+fEGlE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b0924ea1889b366de6bb0018a9db70b2c43a15f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-25.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1764587062,
"narHash": "sha256-hdFa0TAVQAQLDF31cEW3enWmBP+b592OvHs6WVe3D8k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1cb7d097cb250f6e1904aacd5f2ba5ffd8a49ce",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"old-ghc-nix": {
"flake": false,
"locked": {
"lastModified": 1631092763,
"narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=",
"owner": "angerman",
"repo": "old-ghc-nix",
"rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8",
"type": "github"
},
"original": {
"owner": "angerman",
"ref": "master",
"repo": "old-ghc-nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"haskellNix": "haskellNix",
"nixpkgs": [
"haskellNix",
"nixpkgs-unstable"
]
}
},
"stackage": {
"flake": false,
"locked": {
"lastModified": 1769472927,
"narHash": "sha256-n2Jv7dUZOrBpMRMHrUoX4eOXNIkr0kglh7opMWKU+OQ=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "cea1fb3718c41ad56ed9edcc723a93f2fc8100f5",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "stackage.nix",
"type": "github"
}
},
"systems": {

View File

@ -1,32 +1,51 @@
{
description = "stackage-server";
# This is a template created by `hix init`
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, haskellNix }:
let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
flake-utils.lib.eachSystem supportedSystems (system:
let
overlays = [ haskellNix.overlay
(final: _prev: {
hixProject =
final.haskell-nix.hix.project {
src = ./.;
# uncomment with your current system for `nix flake show` to work:
evalSystem = "x86_64-linux";
# Add modules configuration here
modules = [
{
# These flags are set by GHC, but are not the default!
packages.directory.flags.os-string = true;
packages.process.flags.os-string = true;
packages.unix.flags.os-string = true;
}
];
};
})
];
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
flake = pkgs.hixProject.flake {};
in flake // {
legacyPackages = pkgs;
});
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
package = pkgs.callPackage ./package.nix {};
in
{
packages.default = package.app;
devShells.default = package.shell;
checks = {
# I used to put these into $out/lib, but justStaticExecutables
# removes that directory. Now I feel like I'm just getting lucky. So
# let's double check the files are there.
file-check = pkgs.runCommand "check-runtime-files" {} ''
if [ -e ${self.packages.${system}.default}/run/config/settings.yml ]; then
touch $out
else
2>&1 echo "Runtime files are missing"
exit 1
fi
'';
};
}
);
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
# This sets the flake to use the IOG nix cache.
# Nix should ask for permission before using it,
# but remove it here if you do not want it to.
extra-substituters = ["https://cache.iog.io"];
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
allow-import-from-derivation = "true";
};
}

View File

@ -1,33 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, aeson, attoparsec, base, bytestring
, case-insensitive, conduit, conduit-extra, containers, crypton
, data-ordlist, deepseq, fetchzip, hashable, http-client
, http-conduit, http-types, lens, lib, memory, QuickCheck
, quickcheck-unicode, regex-posix, resourcet, scientific, tasty
, tasty-hunit, tasty-quickcheck, template-haskell, text, time
, transformers, unordered-containers, xml-conduit, xml-types
}:
mkDerivation {
pname = "amazonka-core";
version = "2.0";
src = fetchzip {
url = "https://github.com/brendanhay/amazonka/archive/85e0289f8dc23c54b00f7f1a09845be7e032a1eb.zip";
sha256 = "1mgdz9b7wwc05xksczvzp2hllp7nzl4nr6as5q2fafkgxqzwwx53";
};
postUnpack = "sourceRoot+=/lib/amazonka-core; echo source root reset to $sourceRoot";
libraryHaskellDepends = [
aeson attoparsec base bytestring case-insensitive conduit
conduit-extra containers crypton deepseq hashable http-client
http-conduit http-types lens memory regex-posix resourcet
scientific text time transformers unordered-containers xml-conduit
xml-types
];
testHaskellDepends = [
aeson base bytestring case-insensitive conduit data-ordlist
http-conduit http-types QuickCheck quickcheck-unicode tasty
tasty-hunit tasty-quickcheck template-haskell text time
];
homepage = "https://github.com/brendanhay/amazonka";
description = "Core data types and functionality for Amazonka libraries";
license = lib.licenses.mpl20;
}

View File

@ -1,21 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, base, basement, bytestring, containers
, crypton-x509, crypton-x509-store, crypton-x509-system
, crypton-x509-validation, data-default-class, lib, network, socks
, tls
}:
mkDerivation {
pname = "crypton-connection";
version = "0.3.2";
sha256 = "208be23bc910f8e5f9431995b9c011ed376bb947d79f74c8f51a5e4ecd9e991e";
revision = "1";
editedCabalFile = "1rkana1ghppras20pgpwp2bc8dnsf8lspq90r6124jqd4ckbvx2b";
libraryHaskellDepends = [
base basement bytestring containers crypton-x509 crypton-x509-store
crypton-x509-system crypton-x509-validation data-default-class
network socks tls
];
homepage = "https://github.com/kazu-yamamoto/crypton-connection";
description = "Simple and easy network connections API";
license = lib.licenses.bsd3;
}

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
filter=${1:-.}
gen () {
f="$(mktemp)"
# shellcheck disable=SC2064
trap "rm -f $f" EXIT
if grep -q "$filter" <<< "$1"; then
echo "Generating $1..."
echo "# Generated by $0" > "$f"
cabal2nix "$2" >> "$f" "${@:3}"
mv "$f" "${1}.nix"
else
echo "Skipping $1..."
fi
}
cd "$(dirname "$0")"
gen stackage-server --hpack ../.
# Has my R2 patch, which is still unreleased on 2025-01-24
#echo "...please ignore useless error below..."
2>/dev/null gen amazonka-core https://github.com/brendanhay/amazonka/archive/85e0289f8dc23c54b00f7f1a09845be7e032a1eb.zip --subpath lib/amazonka-core
# Pinned to 5.0.18.4 to avoid accidentally regenerating hoogle files. See
# warning in stack.yaml!
gen hoogle cabal://hoogle-5.0.18.4
# FIXME: I don't remember why this had to be patched.
gen pantry https://github.com/commercialhaskell/pantry/archive/5df643cc1deb561d9c52a9cb6f593aba2bc4c08e.zip
echo "Success!"

17
nix/hix.nix Normal file
View File

@ -0,0 +1,17 @@
{pkgs, ...}: {
name = "stackage-server";
compiler-nix-name = "ghc910"; # Version of GHC to use
# Cross compilation support:
# crossPlatforms = p: pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 ([
# p.mingwW64
# p.ghcjs
# ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
# p.musl64
# ]);
# Tools to include in the development shell
shell.tools.cabal = "latest";
# shell.tools.hlint = "latest";
# shell.tools.haskell-language-server = "latest";
}

View File

@ -1,35 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, aeson, base, binary, blaze-html, blaze-markup
, bytestring, cmdargs, conduit, conduit-extra, containers
, crypton-connection, deepseq, directory, extra, filepath
, foundation, hashable, haskell-src-exts, http-conduit, http-types
, js-flot, js-jquery, lib, mmap, old-locale, process-extras
, QuickCheck, resourcet, safe, storable-tuple, tar
, template-haskell, text, time, transformers, uniplate, utf8-string
, vector, wai, wai-logger, warp, warp-tls, zlib
}:
mkDerivation {
pname = "hoogle";
version = "5.0.18.4";
sha256 = "9d0f2de39821d14e8a436d5fda3523e789258b8041f02dd655f0e37d5013e323";
revision = "1";
editedCabalFile = "1129flhhb1992rijw46dclvmpqlylmbrzl4swsnk2knylx6jgw5a";
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
aeson base binary blaze-html blaze-markup bytestring cmdargs
conduit conduit-extra containers crypton-connection deepseq
directory extra filepath foundation hashable haskell-src-exts
http-conduit http-types js-flot js-jquery mmap old-locale
process-extras QuickCheck resourcet safe storable-tuple tar
template-haskell text time transformers uniplate utf8-string vector
wai wai-logger warp warp-tls zlib
];
executableHaskellDepends = [ base ];
testTarget = "--test-option=--no-net";
homepage = "https://hoogle.haskell.org/";
description = "Haskell API Search";
license = lib.licenses.bsd3;
mainProgram = "hoogle";
}

View File

@ -1,45 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, aeson, ansi-terminal, base, bytestring, Cabal
, casa-client, casa-types, conduit, conduit-extra, containers
, cryptonite, cryptonite-conduit, digest, exceptions, fetchzip
, filelock, generic-deriving, hackage-security, hedgehog, hpack
, hspec, http-client, http-client-tls, http-conduit, http-download
, http-types, lib, memory, mtl, network-uri, path, path-io
, persistent, persistent-sqlite, persistent-template, primitive
, QuickCheck, raw-strings-qq, resourcet, rio, rio-orphans
, rio-prettyprint, tar-conduit, text, text-metrics, time
, transformers, unix-compat, unliftio, unordered-containers, vector
, yaml, zip-archive
}:
mkDerivation {
pname = "pantry";
version = "0.5.7";
src = fetchzip {
url = "https://github.com/commercialhaskell/pantry/archive/5df643cc1deb561d9c52a9cb6f593aba2bc4c08e.zip";
sha256 = "15m9ggg5jf30c1lxi0wgn76savrarwr2khzcd1rpnprdq3jnppzs";
};
libraryHaskellDepends = [
aeson ansi-terminal base bytestring Cabal casa-client casa-types
conduit conduit-extra containers cryptonite cryptonite-conduit
digest filelock generic-deriving hackage-security hpack http-client
http-client-tls http-conduit http-download http-types memory mtl
network-uri path path-io persistent persistent-sqlite
persistent-template primitive resourcet rio rio-orphans
rio-prettyprint tar-conduit text text-metrics time transformers
unix-compat unliftio unordered-containers vector yaml zip-archive
];
testHaskellDepends = [
aeson ansi-terminal base bytestring Cabal casa-client casa-types
conduit conduit-extra containers cryptonite cryptonite-conduit
digest exceptions filelock generic-deriving hackage-security
hedgehog hpack hspec http-client http-client-tls http-conduit
http-download http-types memory mtl network-uri path path-io
persistent persistent-sqlite persistent-template primitive
QuickCheck raw-strings-qq resourcet rio rio-orphans rio-prettyprint
tar-conduit text text-metrics time transformers unix-compat
unliftio unordered-containers vector yaml zip-archive
];
homepage = "https://github.com/commercialhaskell/pantry#readme";
description = "Content addressable Haskell package management";
license = lib.licenses.bsd3;
}

View File

@ -1,12 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, base, deepseq, lib, QuickCheck }:
mkDerivation {
pname = "safe";
version = "0.3.20";
sha256 = "ba9983610f9004a2ab67f5ddf11c9dff34f753b9fe11259f1ff77c2f3166df24";
libraryHaskellDepends = [ base ];
testHaskellDepends = [ base deepseq QuickCheck ];
homepage = "https://github.com/ndmitchell/safe#readme";
description = "Library of safe (exception free) functions";
license = lib.licenses.bsd3;
}

View File

@ -1,77 +0,0 @@
# Generated by ./gen-packages.sh
{ mkDerivation, aeson, amazonka, amazonka-core, amazonka-s3
, auto-update, barrier, base, blaze-html, blaze-markup, bytestring
, Cabal, casa-client, classy-prelude, classy-prelude-conduit
, classy-prelude-yesod, cmark-gfm, conduit, conduit-extra
, containers, deepseq, directory, email-validate, esqueleto
, exceptions, fast-logger, file-embed, filepath, formatting, gauge
, ghc-prim, haddock-library, hashable, hoogle, hpack, html-conduit
, http-client, http-conduit, http-types, lens, lib, monad-logger
, mono-traversable, mtl, optparse-applicative, pantry, path
, path-io, path-pieces, persistent, persistent-postgresql
, persistent-sqlite, persistent-template, process, resource-pool
, resourcet, retry, rio, shakespeare, streaming-commons
, tar-conduit, template-haskell, text, these, transformers
, unliftio, unordered-containers, wai, wai-extra, wai-logger, warp
, xml-conduit, xml-types, yaml, yesod, yesod-auth, yesod-core
, yesod-form, yesod-gitrepo, yesod-gitrev, yesod-newsfeed
, yesod-sitemap, yesod-static, zlib
}:
mkDerivation {
pname = "stackage-server";
version = "0.0.0";
src = ../.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson amazonka amazonka-core amazonka-s3 auto-update barrier base
blaze-html blaze-markup bytestring Cabal classy-prelude
classy-prelude-conduit classy-prelude-yesod cmark-gfm conduit
conduit-extra containers deepseq directory email-validate esqueleto
exceptions fast-logger file-embed filepath formatting ghc-prim
haddock-library hashable hoogle html-conduit http-client
http-conduit http-types lens monad-logger mono-traversable mtl
pantry path path-pieces persistent persistent-postgresql
persistent-sqlite persistent-template process resource-pool
resourcet retry rio shakespeare streaming-commons tar-conduit
template-haskell text these transformers unliftio
unordered-containers wai wai-extra wai-logger warp xml-conduit
xml-types yaml yesod yesod-auth yesod-core yesod-form yesod-gitrepo
yesod-gitrev yesod-newsfeed yesod-sitemap yesod-static zlib
];
libraryToolDepends = [ hpack ];
executableHaskellDepends = [
aeson amazonka amazonka-core amazonka-s3 auto-update barrier base
blaze-html blaze-markup bytestring Cabal classy-prelude
classy-prelude-conduit classy-prelude-yesod cmark-gfm conduit
conduit-extra containers deepseq directory email-validate esqueleto
exceptions fast-logger file-embed filepath formatting ghc-prim
haddock-library hashable hoogle html-conduit http-client
http-conduit http-types lens monad-logger mono-traversable mtl
optparse-applicative pantry path path-pieces persistent
persistent-postgresql persistent-sqlite persistent-template process
resource-pool resourcet retry rio shakespeare streaming-commons
tar-conduit template-haskell text these transformers unliftio
unordered-containers wai wai-extra wai-logger warp xml-conduit
xml-types yaml yesod yesod-auth yesod-core yesod-form yesod-gitrepo
yesod-gitrev yesod-newsfeed yesod-sitemap yesod-static zlib
];
benchmarkHaskellDepends = [
aeson amazonka amazonka-core amazonka-s3 auto-update barrier base
blaze-html blaze-markup bytestring Cabal casa-client classy-prelude
classy-prelude-conduit classy-prelude-yesod cmark-gfm conduit
conduit-extra containers deepseq directory email-validate esqueleto
exceptions fast-logger file-embed filepath formatting gauge
ghc-prim haddock-library hashable hoogle html-conduit http-client
http-conduit http-types lens monad-logger mono-traversable mtl
pantry path path-io path-pieces persistent persistent-postgresql
persistent-sqlite persistent-template process resource-pool
resourcet retry rio shakespeare streaming-commons tar-conduit
template-haskell text these transformers unliftio
unordered-containers wai wai-extra wai-logger warp xml-conduit
xml-types yaml yesod yesod-auth yesod-core yesod-form yesod-gitrepo
yesod-gitrev yesod-newsfeed yesod-sitemap yesod-static zlib
];
prePatch = "hpack";
license = lib.licenses.mit;
}

View File

@ -1,30 +0,0 @@
# Generated by ./gen-package-nix.sh
{ mkDerivation, asn1-encoding, asn1-types, async, base, bytestring
, cereal, crypton, crypton-x509, crypton-x509-store
, crypton-x509-validation, data-default-class, gauge, hourglass
, lib, memory, mtl, network, QuickCheck, tasty, tasty-quickcheck
, transformers, unix-time
}:
mkDerivation {
pname = "tls";
version = "1.8.0";
sha256 = "4a8486df3f1bd865753e7ac5f89bb252401fb91c8350226285e1075a78919808";
libraryHaskellDepends = [
asn1-encoding asn1-types async base bytestring cereal crypton
crypton-x509 crypton-x509-store crypton-x509-validation
data-default-class memory mtl network transformers unix-time
];
testHaskellDepends = [
asn1-types async base bytestring crypton crypton-x509
crypton-x509-validation data-default-class hourglass QuickCheck
tasty tasty-quickcheck
];
benchmarkHaskellDepends = [
asn1-types async base bytestring crypton crypton-x509
crypton-x509-validation data-default-class gauge hourglass
QuickCheck tasty-quickcheck
];
homepage = "https://github.com/haskell-tls/hs-tls";
description = "TLS/SSL protocol native implementation (Server and Client)";
license = lib.licenses.bsd3;
}

View File

@ -1,45 +0,0 @@
{ pkgs }:
let
hlib = pkgs.haskell.lib;
hpkgs = pkgs.haskellPackages.override {
overrides = self: super: {
stackage-server = hlib.overrideCabal (self.callPackage nix/stackage-server.nix { }) (old: {
preConfigure = ''
${pkgs.hpack}/bin/hpack .
'';
# During build, static files are generated into the source tree's
# static/ dir. Plus, config/ is needed at runtime.
postInstall = ''
mkdir -p $out/run
cp -a {static,config} $out/run
'';
src = pkgs.lib.cleanSource old.src;
});
# patched, see gen-package-nix.sh
amazonka-core = self.callPackage nix/amazonka-core.nix { };
# We have this old dependency for unexplored reasons.
# Tests fail from attempted network access.
pantry = pkgs.lib.pipe (self.callPackage nix/pantry.nix { }) [hlib.dontCheck hlib.doJailbreak];
# Changing this has operational impacts.
hoogle = self.callPackage nix/hoogle.nix { };
# Outdated breakage? (TODO: upstream)
barrier = hlib.markUnbroken super.barrier;
# Tests fail from attempted network access (TODO: upstream)
yesod-gitrev = hlib.markUnbroken (hlib.dontCheck super.yesod-gitrev);
};
};
in
{
app = hlib.justStaticExecutables hpkgs.stackage-server;
shell = hpkgs.shellFor {
packages = p: [ p.stackage-server ];
buildInputs = [ pkgs.cabal-install pkgs.haskell-language-server pkgs.ghcid pkgs.haskellPackages.yesod-bin pkgs.postgresql ];
};
}

View File

@ -1,7 +0,0 @@
(import (
fetchGit {
url = "https://github.com/edolstra/flake-compat";
}
) {
src = ./.;
}).shellNix