Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tchoutri/horizon-platform
  • jonge/horizon-platform
  • raoulhc/horizon-platform
  • package-sets/horizon-platform
Show changes
Commits on Source (348)
Showing with 4856 additions and 3582 deletions
let Prelude =
env:DHALL_PRELUDE
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v20.1.0/Prelude/package.dhall
sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
let H =
https://gitlab.horizon-haskell.net/dhall/horizon-spec/-/raw/0.10.0/horizon-spec/package.dhall
let toStep
: Text → Text
= λ(x : Text) →
"nix build --accept-flake-config --json .#${x} | jq -r '.[].outputs | to_entries[].value' | cachix push horizon"
let toEchoStep
: Text → Text
= λ(x : Text) → "echo \"${toStep x}\""
let input =
Prelude.Map.keys
Text
H.HaskellPackage.Type
( merge
{ MakePackageSet =
λ(x : H.PackageSetExportSettings) → x.packageSet.packages
, MakeOverlay = λ(x : H.OverlayExportSettings) → x.overlay.packages
}
./horizon.dhall
)
let packages = Prelude.List.map Text Text toEchoStep (input : List Text)
in "("
++ Prelude.List.fold
Text
packages
Text
(λ(x : Text) → λ(y : Text) → x ++ ";" ++ y)
""
++ ") | parallel -j 16"
stages:
- generate
- check
- cache
- build
- devour
- cachix
generate-flake-ci:
stage: generate
script: nix run "git+https://gitlab.homotopic.tech/haskell/flake-to-gitlab-ci?ref=refs/tags/0.2.2.0" > flake-ci.yml
artifacts:
paths:
- flake-ci.yml
build:
stage: build
script:
- nix build .#packages.$SYSTEM.$PACKAGE -L
parallel:
matrix:
- SYSTEM:
- aarch64-darwin
- x86_64-linux
PACKAGE:
- aeson
- beam-postgres
- composite-base
- dhall
- hedgehog
- hoauth2-providers
- log-effectful
- persistent-postgresql
- polysemy
- servant
- souffle-haskell
- sydtest
- tasty
- wai-app-static
- warp
- SYSTEM:
- x86_64-linux
PACKAGE:
- streamly
flake-ci:
stage: check
trigger:
include:
- artifact: flake-ci.yml
job: generate-flake-ci
strategy: depend
devour:
stage: devour
script:
- nix build github:srid/devour-flake#packages.$SYSTEM.default -L --no-link --print-out-paths --override-input flake . --keep-going
parallel:
matrix:
- SYSTEM:
- aarch64-darwin
- x86_64-linux
cachix:
stage: cache
only:
refs:
- master
- cachix
script: nix-shell -p jq cachix parallel --command 'dhall --file .cachix.dhall | dhall text | bash'
stage: cachix
rules:
- if: $CI_COMMIT_REF_PROTECTED == "true"
script:
- nix-shell -p cachix --command "nix build github:srid/devour-flake#packages.$SYSTEM.default -L --no-link --print-out-paths --override-input flake . | xargs cat | cachix push horizon"
parallel:
matrix:
- SYSTEM:
- aarch64-darwin
- x86_64-linux
MIT License
Copyright (c) 2022-2023 Homotopic.Tech Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -2,76 +2,83 @@
[horizon-haskell.net](https://horizon-haskell.net).
Horizon is a haskell package set targetting new builds of GHC.
## Package Set Policy
This package set has the following policy.
* GHC will advance as often as possible
* Nonversioned locations (git, unversioned tarballs) are permitted to allow
GHC to advance.
* The following packages must always build:
* aeson
* beam-postgres
* composite-base
* dhall
* haskell-language-server
* hedgehog
* pandoc
* persistent-postgresql
* polysemy
* servant
* sydtest
* tasty
* xmonad-contrib
* xmonad
* wai-app-static
* warp
* Tags will be of the form `unstable-<yyyy>-<mm>-<dd>-r<N>` where any
unversioned source is used.
* Tags will be of the form `stable-<yyyy>-<mm>-<dd>-r<N>` where all
stable sources are used.
## Updating the package set
The package set is generated from the `horizon.dhall` using the following command:
horizon-platform is a haskell package set targetting new builds of GHC. This package set extends [horizon-platform](https://gitlab.horizon-haskell.net/package-sets/horizon-platform).
The following things are expected to be here:
* aeson
* beam-postgres
* composite-base
* dhall
* hedgehog
* hoauth2-providers
* log-effectful
* persistent-postgresql
* polysemy
* servant
* souffle-haskell
* streamly
* sydtest
* tasty
* wai-app-static
* warp
## Updating the Package Set
Generating the nix expressions for the package set is a two step process.
1. Edit the `horizon.dhall` file.
2. Generate the nix expressions with
```
nix run 'git+https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix?ref=refs/tags/0.9.0'
nix run develop/#horizon-gen-nix -- -jN
```
This will generate both the packages folder and the package set file. If you
want to regenerate a particular package in the packages folder, delete that file
from the packages folder. To regenerate the entire package set from scratch,
delete the packages folder.
You can edit the `horizon.dhall` file in one of two ways: manually using a text
editor, or programatically using `horizon-shell`.
If you need to do additional manual overrides to the nix code, such as
`addPkgconfigDepends`, edit the `configuration.nix` overlay, which is applied
afterwards.
If you want to bumping everything listed in the `horizon.dhall` file to the latest
bounds, run
## Programmmatic Updates
```
nix run develop/#try-to-upgrade-everything
```
### Using horizon-shell.
To use `horizon-shell`.
```
nix run 'git+https://gitlab.horizon-haskell.net/shells/horizon-shell?ref=refs/tags/0.0.1'
nix run develop/#horizon-shell
```
The package set will be automatically loaded under the variable `hz`.
This is a haskell interpreter with a few shortcut functions available. Running
`tryToUpgradeEverything` will poll hackage for any potential updates and add
them to the dhall file. This will only modify the dhall, not the nix
expressions. You must remember to run `nix run develop/#horizon-gen-nix`
afterwards.
```
let f = L.at "lens" L..~ Just (H.callHackage "lens" "5.1")
To quickly add a new package to the dhall, use the `addHackage` function. For example
`addHackage "optics"`.
:t f
f :: (L.IxValue t ~ HaskellPackage, L.At t,
IsString (L.Index t)) =>
t -> t
## Tweaking & Hacking
let hz' = f hz
If you need to do additional manual overrides to the nix code, such as
`addPkgconfigDepends`, edit the `configuration/common.nix` overlay, which is
applied over the generated derivations.
## Feedback
H.writeHorizonFile hz'
To build all packages, run
```
nix run develop/#feedback -- build
```
## Hoogle
Then remember to delete `pkgs/lens.nix` and re-run horizon-gen-nix as usual.
To get a hoogle instance for the entire package set, you can run:
```
nix run .#apps.x86_64-linux.run-hoogle
```
{ pkgs, haskellLib }:
let
inherit (pkgs) fetchpatch lib;
inherit (lib) throwIfNot versionOlder;
in
self: super: {
llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
# Disable GHC core libraries.
array = null;
base = null;
binary = null;
bytestring = null;
containers = null;
deepseq = null;
directory = null;
exceptions = null;
filepath = null;
ghc-bignum = null;
ghc-boot = null;
ghc-boot-th = null;
ghc-compact = null;
ghc-heap = null;
ghc-prim = null;
ghci = null;
haskeline = null;
hpc = null;
integer-gmp = null;
libiserv = null;
mtl = null;
pretty = null;
process = null;
rts = null;
stm = null;
system-cxx-std-lib = null;
template-haskell = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
unix = null;
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
}
{ pkgs, haskellLib }:
with pkgs.haskell.lib;
final: prev: {
digest = addExtraLibrary prev.digest pkgs.zlib;
hopenssl = prev.hopenssl.override { openssl = pkgs.openssl_1_1; };
libsodium = prev.callPackage ./pkgs/libsodium.nix { inherit (pkgs) libsodium; };
saltine = addPkgconfigDepend prev.saltine pkgs.libsodium;
splitmix = prev.callPackage ./pkgs/splitmix.nix { inherit (pkgs) testu01; };
text-icu = prev.callPackage ./pkgs/text-icu.nix { icu-i18n = pkgs.icu; };
X11-xft = addPkgconfigDepends prev.X11-xft [ pkgs.expat pkgs.xorg.libXau pkgs.xorg.libXdmcp ];
zlib = prev.callPackage ./pkgs/zlib.nix { inherit (pkgs) zlib; };
}
......@@ -11,5 +11,12 @@ final: prev: {
iwlib = null;
libsystemd-journal = null;
llvm-hs = null;
sdl2-mixer = null;
streamly = null;
}
{ pkgs, haskellLib }:
with haskellLib;
final: prev: {
dhall-docs = null;
hfsevents = null;
mmark = null;
stripeapi = null;
}
{ pkgs, haskellLib }:
with haskellLib;
final: prev: {
cheapskate = null;
hasql-explain-tests = null;
sandwich = null;
text-icu = prev.callPackage ../pkgs/text-icu.nix { icu-i18n = pkgs.icu; };
thyme = null;
tmp-postgres = null;
X11-xft = addPkgconfigDepends prev.X11-xft [ pkgs.expat pkgs.xorg.libXau pkgs.xorg.libXdmcp ];
}
{ pkgs, haskellLib }:
with pkgs.haskell.lib;
final: prev: {
alsa-core = null;
alsa-mixer = null;
hfsevents = prev.callPackage ../pkgs/hfsevents.nix {
Cocoa = pkgs.darwin.apple_sdk.frameworks.Cocoa;
CoreServices = pkgs.darwin.apple_sdk.frameworks.CoreServices;
};
iwlib = null;
libsystemd-journal = null;
sdl2-mixer = null;
hinotify = final.hfsevents;
}
{ pkgs, haskellLib }:
with haskellLib;
final: prev: {
hfsevents = null;
}
This diff is collapsed.
{
nixConfig = {
extra-substituters = "https://horizon.cachix.org";
extra-trusted-public-keys = "horizon.cachix.org-1:MeEEDRhRZTgv/FFGCv3479/dmJDfJ82G6kfUDxMSAw0=";
};
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
horizon-develop-flake.url = "git+https://gitlab.horizon-haskell.net/nix/horizon-develop-flake";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
inputs@
{ self
, flake-parts
, nixpkgs
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; }
{
systems = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
imports = [
inputs.horizon-develop-flake.flakeModule
];
};
}
{
"nodes": {
"devenv": {
"flake-parts": {
"inputs": {
"flake-compat": "flake-compat",
"nix": "nix",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1678720350,
"narHash": "sha256-2WUISGDqlshoLgLh2BCqWn0jAcHOnROYtEpgemmxXaQ=",
"owner": "cachix",
"repo": "devenv",
"rev": "b97ca4bd581f0e2fb620f301cc417791f655f851",
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "devenv",
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts": {
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1675933616,
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
......@@ -55,237 +54,250 @@
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
"horizon-advance": {
"inputs": {
"flake-parts": [
"horizon-advance",
"horizon-core",
"flake-parts"
],
"horizon-core": "horizon-core",
"horizon-hoogle": "horizon-hoogle_2",
"nixpkgs": "nixpkgs_4"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
"lastModified": 1719751316,
"narHash": "sha256-exJ80zZPyiSxiYQb4IreK7LDpjfBLOCPb77QUn3TGR8=",
"ref": "lts/ghc-9.10.x",
"rev": "36784235da4dd828b3e139a855dc8410fff91376",
"revCount": 259,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
"ref": "lts/ghc-9.10.x",
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance"
}
},
"get-flake": {
"horizon-build-packages": {
"inputs": {
"flake-parts": [
"horizon-advance",
"horizon-core",
"horizon-build-packages",
"horizon-ghc",
"flake-parts"
],
"horizon-ghc": "horizon-ghc",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1644686428,
"narHash": "sha256-zkhYsURWFrvEZLkIoBeqFBzSu+cA2u5mo6M8vq9LN7M=",
"owner": "ursi",
"repo": "get-flake",
"rev": "703f15558daa56dfae19d1858bb3046afe68831a",
"type": "github"
"lastModified": 1718969469,
"narHash": "sha256-0Q8v/yNwcLZy0znegLXx/SQmbfd2d/4TBSrFYh7g7+0=",
"ref": "refs/heads/master",
"rev": "23fa82740dc197706a3737c8830b724ccabafac4",
"revCount": 96,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages"
},
"original": {
"owner": "ursi",
"repo": "get-flake",
"type": "github"
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages"
}
},
"gitignore": {
"horizon-core": {
"inputs": {
"nixpkgs": [
"devenv",
"pre-commit-hooks",
"nixpkgs"
]
"flake-parts": "flake-parts_2",
"horizon-build-packages": "horizon-build-packages",
"horizon-hoogle": "horizon-hoogle",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
"lastModified": 1718977916,
"narHash": "sha256-sssWF/XjZga4asgwvovPLAbg8E2EyLDQOYSFgUbKg6c=",
"ref": "refs/heads/master",
"rev": "81674e75e63548341ebe0cb94127044255affb55",
"revCount": 1375,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core"
}
},
"horizon-platform": {
"flake": false,
"horizon-ghc": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1678886634,
"narHash": "sha256-PkiDQImBu4i9sOKiOIEDMryBGn3ouBZ/H0+mAyOEbLk=",
"lastModified": 1718969245,
"narHash": "sha256-eeMsOK3Hmm23SH45GdbuWRtpEcMWZPC/JCYvKL2LOos=",
"ref": "refs/heads/master",
"rev": "0b3c27cd666315edca0585e82ed6d74f208fff5b",
"revCount": 997,
"rev": "0bcfe994903359aef81338915706bf6b2f38aaa4",
"revCount": 109,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform"
"url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc"
},
"original": {
"type": "git",
"url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform"
"url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc"
}
},
"lint-utils": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"horizon-hoogle": {
"locked": {
"lastModified": 1670623736,
"narHash": "sha256-CrA/yua5H0NfZ2tu1QZ2WpYi6pkWzyFxiwGk+KoF620=",
"lastModified": 1701521742,
"narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=",
"ref": "refs/heads/master",
"rev": "ee76287dc9987dd01ec38d38839b788a26ee5f24",
"revCount": 45,
"rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e",
"revCount": 2,
"type": "git",
"url": "https://gitlab.homotopic.tech/nix/lint-utils"
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
},
"original": {
"type": "git",
"url": "https://gitlab.homotopic.tech/nix/lint-utils"
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
}
},
"lowdown-src": {
"flake": false,
"horizon-hoogle_2": {
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
"lastModified": 1701521742,
"narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=",
"ref": "refs/heads/master",
"rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e",
"revCount": 2,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
"type": "git",
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-regression": "nixpkgs-regression"
},
"horizon-hoogle_3": {
"locked": {
"lastModified": 1676545802,
"narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=",
"owner": "domenkozar",
"repo": "nix",
"rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f",
"type": "github"
"lastModified": 1701521742,
"narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=",
"ref": "refs/heads/master",
"rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e",
"revCount": 2,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
},
"original": {
"owner": "domenkozar",
"ref": "relaxed-flakes",
"repo": "nix",
"type": "github"
"type": "git",
"url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1678500213,
"narHash": "sha256-A5s2rXawJ+dCThkMXoMuYW8dgyUmkElcyfVJUot/Vr0=",
"lastModified": 1718928808,
"narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2ce9b9842b5e63884dfc3dea6689769e2a1ea309",
"rev": "564000ae34c6af8549f3729051bbae33403e298c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"ref": "haskell-updates",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1675183161,
"narHash": "sha256-Zq8sNgAxDckpn7tJo7V1afRSk2eoVbu3OjI1QklGLNg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e1e1b192c1a5aab2960bf0a0bd53a2e8124fa18e",
"type": "github"
"lastModified": 1738452942,
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
}
},
"nixpkgs-regression": {
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs-lib_3": {
"locked": {
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1718928808,
"narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"rev": "564000ae34c6af8549f3729051bbae33403e298c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "haskell-updates",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs-stable": {
"nixpkgs_3": {
"locked": {
"lastModified": 1673800717,
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
"lastModified": 1718928808,
"narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
"rev": "564000ae34c6af8549f3729051bbae33403e298c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "haskell-updates",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_4": {
"locked": {
"lastModified": 1644525281,
"narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=",
"lastModified": 1719706517,
"narHash": "sha256-ynXAAr5AJgTQHQAJW4GH3i8auqnZVzcjCokZMdEKjcs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2",
"rev": "01da4c59cc4879540b7a5d73230475b4616a0dc8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "haskell-updates",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_5": {
"locked": {
"lastModified": 1673947312,
"narHash": "sha256-xx/2nRwRy3bXrtry6TtydKpJpqHahjuDB5sFkQ/XNDE=",
"lastModified": 1739138025,
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2d38b664b4400335086a713a0036aafaa002c003",
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
"type": "github"
},
"original": {
......@@ -295,42 +307,12 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1678376203,
"narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "1a20b9708962096ec2481eeb2ddca29ed747770a",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"flake-parts": "flake-parts",
"get-flake": "get-flake",
"horizon-platform": "horizon-platform",
"lint-utils": "lint-utils",
"nixpkgs": "nixpkgs_3"
"horizon-advance": "horizon-advance",
"horizon-hoogle": "horizon-hoogle_3",
"nixpkgs": "nixpkgs_5"
}
}
},
......
......@@ -8,92 +8,41 @@
};
inputs = {
devenv.url = "github:cachix/devenv";
get-flake.url = "github:ursi/get-flake";
flake-parts.url = "github:hercules-ci/flake-parts";
horizon-platform = {
url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform";
flake = false;
};
lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils";
horizon-advance.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-advance?ref=lts/ghc-9.10.x";
horizon-hoogle.url = "git+https://gitlab.horizon-haskell.net/nix/horizon-hoogle";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
inputs@
{ self
, devenv
, get-flake
, flake-parts
, horizon-platform
, lint-utils
, nixpkgs
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ];
perSystem = { config, system, ... }:
let
pkgs = nixpkgs.legacyPackages.${system};
in
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
imports = [
inputs.horizon-hoogle.flakeModule
];
perSystem = { pkgs, config, system, ... }:
with pkgs.lib;
with pkgs.writers;
with lint-utils.writers.${system};
let
haskellLib = pkgs.haskell.lib;
modifiers = import ./modifiers.nix { inherit pkgs; };
overrides = composeManyExtensions [
(import ./overlay.nix { inherit pkgs; f = modifiers; })
(import ./configuration/common.nix { inherit pkgs haskellLib; })
(import (./configuration + "/${system}.nix") { inherit pkgs haskellLib; })
];
horizon-platform-prev = get-flake horizon-platform;
horizon-gen-nix = pkgs.writeShellApplication {
name = "horizon-gen-nix";
runtimeInputs = with pkgs; [ ghc cabal-install ];
text = ''
${horizon-platform-prev.legacyPackages.${system}.horizon-gen-nix}/bin/horizon-gen-nix;
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt pkgs/*
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt initial-packages.nix
'';
};
legacyPackages = inputs.horizon-advance.legacyPackages.${system}.extend overrides;
haskellLib = pkgs.haskell.lib.compose;
legacyPackages = pkgs.callPackage (nixpkgs + /pkgs/development/haskell-modules) {
buildHaskellPackages = pkgs.haskell.packages.ghc944;
compilerConfig = pkgs.callPackage ./configuration-ghc.nix { inherit haskellLib; };
configurationArm = { pkgs, haskellLib }: self: super: { };
configurationCommon = import ./configuration.nix;
configurationDarwin = import ./configuration-darwin.nix;
configurationNix = { pkgs, haskellLib }: self: super: { };
ghc = pkgs.haskell.compiler.ghc944;
inherit haskellLib;
initialPackages = import ./initial-packages.nix;
nonHackagePackages = self: super: { };
};
packages = filterAttrs
(n: v: v != null
&& builtins.typeOf v == "set"
&& pkgs.lib.hasAttr "type" v
&& v.type == "derivation"
&& v.meta.broken == false)
legacyPackages;
packages = filterAttrs (_: isDerivation) legacyPackages;
in
{
checks = with lint-utils.linters.${system}; {
dhall-format = dhall-format { src = self; };
nixpkgs-fmt = nixpkgs-fmt { src = self; };
stylish-haskell = stylish-haskell { src = self; };
};
devShells.default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
({ pkgs, ... }: {
packages = [ horizon-gen-nix pkgs.nixpkgs-fmt ];
})
];
};
inherit legacyPackages;
inherit packages;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{ pkgs, ... }:
with pkgs.lib;
_: prev: name: v: if hasAttr name prev then warn "${name} exists in parent set" v else v
This diff is collapsed.