From 8284bf1e18651ad704b2b53cdd9f3cadde105c28 Mon Sep 17 00:00:00 2001 From: Daniel Firth <dan.firth@homotopic.tech> Date: Fri, 3 Nov 2023 16:31:51 +0000 Subject: [PATCH] develop flake --- README.md | 46 +- develop/flake.lock | 1352 ++++++++++++++++++++++++++++++++++++++++++++ develop/flake.nix | 96 ++++ 3 files changed, 1477 insertions(+), 17 deletions(-) create mode 100644 develop/flake.lock create mode 100644 develop/flake.nix diff --git a/README.md b/README.md index d1fc24ab..68e78a53 100644 --- a/README.md +++ b/README.md @@ -27,34 +27,46 @@ This package set has the following policy. * wai-app-static * warp -## Updating the package set +## Updating the Package Set -The package set is generated from the `horizon.dhall`. You can edit this in one -of two ways: manually using a text edit, or programatically using -`horizon-shell`. +Generating the nix expressions for the package set is a two step process. -### Manual +1. Edit the `horizon.dhall` file. +2. Generate the nix expressions with `nix run develop/#horizon-gen-nix`. -Edit the `horizon.dhall` file and add or change some package data. +You can edit the `horizon.dhall` file in one of two ways: manually using a text +editor, or programatically using `horizon-shell`. -Run `horizon-gen-nix` from the remote repository. - -``` -nix run 'git+https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix?ref=refs/tags/0.10.0' -``` - -### Programatic +### Using horizon-shell. To use `horizon-shell`. ``` -nix develop +nix run develop/#horizon-shell ``` -See the in-shell help for usage. +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. + +To quickly add a new package to the dhall, use the `addHackage` function. For example +`addHackage "optics"`. -### Tweaking +## Tweaking & Hacking If you need to do additional manual overrides to the nix code, such as `addPkgconfigDepends`, edit the `configuration/common.nix` overlay, which is -applied last. +applied over the generated derivations. + +If you need to nullify libraries, use the `configuration/hacking.nix` overlay. +Try to leave a note as to why this library has been nullified. + +## Feedback + +To build all packages, run + +``` +nix run develop/#feedback -- build +``` diff --git a/develop/flake.lock b/develop/flake.lock new file mode 100644 index 00000000..9cc0745d --- /dev/null +++ b/develop/flake.lock @@ -0,0 +1,1352 @@ +{ + "nodes": { + "autodocodec": { + "flake": false, + "locked": { + "lastModified": 1696603846, + "narHash": "sha256-GfcJ1T+4SQ+3T1Q4jO7xNcqn7Kvfp65MF19Un7K36yI=", + "owner": "NorfairKing", + "repo": "autodocodec", + "rev": "762eb76333e9812160733e377b973ff76fe45378", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "autodocodec", + "type": "github" + } + }, + "crazyshell": { + "inputs": { + "flake-utils": "flake-utils_7", + "get-flake": "get-flake_3", + "horizon-platform": "horizon-platform_2", + "lint-utils": "lint-utils_6", + "nixpkgs": "nixpkgs_11" + }, + "locked": { + "lastModified": 1680415307, + "narHash": "sha256-r5AlSRqlamRyIigCkA+Hq2ZkqFt+lE0bfOGMcQWLUlg=", + "ref": "refs/heads/master", + "rev": "42f4da076ee81c8e245731bf6fdf57cb25db3604", + "revCount": 22, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/crazyshell" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/crazyshell" + } + }, + "dekking": { + "flake": false, + "locked": { + "lastModified": 1694680694, + "narHash": "sha256-LON8AC76I28A7cyfuDwvX7/uMOKPNwkuS8Y/YyOXv2c=", + "owner": "NorfairKing", + "repo": "dekking", + "rev": "97875f0a6aa9ca659dfe3303d02dfdf94f56a36c", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "dekking", + "type": "github" + } + }, + "fast-myers-diff": { + "flake": false, + "locked": { + "lastModified": 1696885120, + "narHash": "sha256-wqJ0/P3pXOISDhRHpEt11GVYllb+DFt46Mh+k/y1bYw=", + "owner": "NorfairKing", + "repo": "fast-myers-diff", + "rev": "c106ef803c69ef9440399247ec4ffd59c84f6fc7", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "fast-myers-diff", + "type": "github" + } + }, + "feedback": { + "inputs": { + "autodocodec": "autodocodec", + "dekking": "dekking", + "fast-myers-diff": "fast-myers-diff", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": "pre-commit-hooks", + "safe-coloured-text": "safe-coloured-text", + "sydtest": "sydtest", + "validity": "validity" + }, + "locked": { + "lastModified": 1697134928, + "narHash": "sha256-QuQrszOuhrznaaPEL1SzHU8Cx5vWHmo4/6ztnzcfUe8=", + "owner": "NorfairKing", + "repo": "feedback", + "rev": "ee5b44fda04d6bde7b3df19d07d184be7df623a2", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "feedback", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1680392223, + "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, + "locked": { + "lastModified": 1683560683, + "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_5" + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_6": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_6" + }, + "locked": { + "lastModified": 1683560683, + "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-to-gitlab-ci": { + "inputs": { + "flake-parts": "flake-parts_2", + "horizon-platform": "horizon-platform", + "lint-utils": "lint-utils_2", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1697445444, + "narHash": "sha256-ozmB2f2mWWWU+HBAvl2wih6O6aa0dN2svD7jgebp2bQ=", + "ref": "refs/tags/0.2.4.2", + "rev": "e299d88689273b4a2a5fe27320eb423f7a05a3ac", + "revCount": 68, + "type": "git", + "url": "https://gitlab.nixica.dev/haskell/flake-to-gitlab-ci" + }, + "original": { + "ref": "refs/tags/0.2.4.2", + "type": "git", + "url": "https://gitlab.nixica.dev/haskell/flake-to-gitlab-ci" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_10": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_11": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_12": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "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" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_9": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "get-flake": { + "locked": { + "lastModified": 1673819588, + "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", + "owner": "ursi", + "repo": "get-flake", + "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "get-flake_2": { + "locked": { + "lastModified": 1673819588, + "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", + "owner": "ursi", + "repo": "get-flake", + "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "get-flake_3": { + "locked": { + "lastModified": 1673819588, + "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", + "owner": "ursi", + "repo": "get-flake", + "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "get-flake_4": { + "locked": { + "lastModified": 1673819588, + "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", + "owner": "ursi", + "repo": "get-flake", + "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "get-flake_5": { + "locked": { + "lastModified": 1673819588, + "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", + "owner": "ursi", + "repo": "get-flake", + "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "feedback", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "horizon-core": { + "inputs": { + "flake-parts": "flake-parts_4", + "get-flake": "get-flake_2", + "lint-utils": "lint-utils_3", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1697043887, + "narHash": "sha256-+ts9eNlYP5EuPXIIrJHbCn+1+5gjU9BphDHs6VNyVec=", + "ref": "refs/heads/master", + "rev": "f8238d98b143e2b0e7d2044a587df79293b255af", + "revCount": 1109, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + } + }, + "horizon-core_2": { + "inputs": { + "flake-parts": "flake-parts_6", + "get-flake": "get-flake_5", + "lint-utils": "lint-utils_7", + "nixpkgs": "nixpkgs_13" + }, + "locked": { + "lastModified": 1697043887, + "narHash": "sha256-+ts9eNlYP5EuPXIIrJHbCn+1+5gjU9BphDHs6VNyVec=", + "ref": "refs/heads/master", + "rev": "f8238d98b143e2b0e7d2044a587df79293b255af", + "revCount": 1109, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + } + }, + "horizon-gen-nix": { + "inputs": { + "flake-utils": "flake-utils_4", + "horizon-core": "horizon-core", + "lint-utils": "lint-utils_4", + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1698091055, + "narHash": "sha256-RxZRtv/ccP9lwcU54OQCFfgWK8C8eyKSbT+vW6Bl7ck=", + "ref": "refs/tags/0.11.0", + "rev": "0f5e5bad673d0c977246e6d96f39a6867e04fad3", + "revCount": 190, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + }, + "original": { + "ref": "refs/tags/0.11.0", + "type": "git", + "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + } + }, + "horizon-platform": { + "inputs": { + "flake-parts": "flake-parts_3", + "get-flake": "get-flake", + "horizon-shell-flake": "horizon-shell-flake", + "lint-utils": "lint-utils", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1681133543, + "narHash": "sha256-hqX9PJj0Ggbunu8+ae6PSOgMO1Vdp/vvawd72MQhdGk=", + "ref": "refs/heads/master", + "rev": "987a46002fc64c4adff114d14a72f5222d96fbf8", + "revCount": 1067, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + } + }, + "horizon-platform_2": { + "inputs": { + "flake-parts": "flake-parts_5", + "get-flake": "get-flake_4", + "horizon-shell-flake": "horizon-shell-flake_2", + "lint-utils": "lint-utils_5", + "nixpkgs": "nixpkgs_10" + }, + "locked": { + "lastModified": 1680120375, + "narHash": "sha256-f6qp5jJFbvt/QU82s82C99xDs/ib6w7GAqrmXsvLw8M=", + "ref": "refs/heads/master", + "rev": "d987b5882bd0dc622687920e14398227a482c4db", + "revCount": 1060, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + } + }, + "horizon-shell": { + "inputs": { + "crazyshell": "crazyshell", + "flake-utils": "flake-utils_10", + "horizon-core": "horizon-core_2", + "lint-utils": "lint-utils_8", + "nixpkgs": "nixpkgs_14" + }, + "locked": { + "lastModified": 1697281965, + "narHash": "sha256-VWAJWUyI3PI/7UKVJ9hkQNrC/NMcUHsqzMayAbfbXZc=", + "ref": "refs/tags/0.0.9", + "rev": "3201b990c51f924838c244cb5d8c5b1ba7b134c8", + "revCount": 36, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + }, + "original": { + "ref": "refs/tags/0.0.9", + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + } + }, + "horizon-shell-flake": { + "flake": false, + "locked": { + "lastModified": 1679524452, + "narHash": "sha256-xzNxvLVa3o0F/z4CnBDORv2Y6PfxjlGv7b7LybIyCSg=", + "ref": "refs/tags/0.0.8", + "rev": "21b8913803cefeb287bb244c7ee335638233db7f", + "revCount": 21, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + }, + "original": { + "ref": "refs/tags/0.0.8", + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + } + }, + "horizon-shell-flake_2": { + "flake": false, + "locked": { + "lastModified": 1679524452, + "narHash": "sha256-xzNxvLVa3o0F/z4CnBDORv2Y6PfxjlGv7b7LybIyCSg=", + "ref": "refs/tags/0.0.8", + "rev": "21b8913803cefeb287bb244c7ee335638233db7f", + "revCount": 21, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + }, + "original": { + "ref": "refs/tags/0.0.8", + "type": "git", + "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + } + }, + "lint-utils": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1676204115, + "narHash": "sha256-cYYt6sN9t+lYYYelAbRtM/ioVJ27kMcUtR4unA8jfd4=", + "ref": "refs/heads/master", + "rev": "cc55bca9b25e65f7060de642c99e51bd96dfc190", + "revCount": 47, + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + } + }, + "lint-utils_2": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "flake-to-gitlab-ci", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681737193, + "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "ref": "refs/heads/master", + "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", + "revCount": 48, + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + } + }, + "lint-utils_3": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1681737193, + "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "ref": "refs/heads/master", + "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", + "revCount": 48, + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + } + }, + "lint-utils_4": { + "inputs": { + "flake-utils": "flake-utils_6", + "nixpkgs": [ + "horizon-gen-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681737193, + "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "ref": "refs/heads/master", + "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", + "revCount": 48, + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + } + }, + "lint-utils_5": { + "inputs": { + "flake-utils": "flake-utils_8", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1676204115, + "narHash": "sha256-cYYt6sN9t+lYYYelAbRtM/ioVJ27kMcUtR4unA8jfd4=", + "ref": "refs/heads/master", + "rev": "cc55bca9b25e65f7060de642c99e51bd96dfc190", + "revCount": 47, + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + } + }, + "lint-utils_6": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixpkgs": [ + "horizon-shell", + "crazyshell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676204115, + "narHash": "sha256-cYYt6sN9t+lYYYelAbRtM/ioVJ27kMcUtR4unA8jfd4=", + "ref": "refs/heads/master", + "rev": "cc55bca9b25e65f7060de642c99e51bd96dfc190", + "revCount": 47, + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.homotopic.tech/nix/lint-utils" + } + }, + "lint-utils_7": { + "inputs": { + "flake-utils": "flake-utils_11", + "nixpkgs": "nixpkgs_12" + }, + "locked": { + "lastModified": 1681737193, + "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "ref": "refs/heads/master", + "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", + "revCount": 48, + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + } + }, + "lint-utils_8": { + "inputs": { + "flake-utils": "flake-utils_12", + "nixpkgs": [ + "horizon-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681737193, + "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "ref": "refs/heads/master", + "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", + "revCount": 48, + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.nixica.dev/nix/lint-utils" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1696983906, + "narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bd1cde45c77891214131cbbea5b1203e485a9d51", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1680213900, + "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e3652e0735fbec227f342712f180f4f21f0594f2", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_3": { + "locked": { + "dir": "lib", + "lastModified": 1678375444, + "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_4": { + "locked": { + "dir": "lib", + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_5": { + "locked": { + "dir": "lib", + "lastModified": 1678375444, + "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_6": { + "locked": { + "dir": "lib", + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_10": { + "locked": { + "lastModified": 1679198465, + "narHash": "sha256-VfXpHpniNWgg7pBzxb20pRX7kqn80LApPDQYTReiFCw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5a05160f7671434e1c833b1b01284b876e04eca4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1680273054, + "narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { + "locked": { + "lastModified": 1644525281, + "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1686701582, + "narHash": "sha256-uCj6bWmhb2RF+kmCP7T5ov5pg3HjksIyv4WDsCHZQyU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "55843b93856ad113166142cb3d2b01ffdcdf5de0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { + "locked": { + "lastModified": 1696757521, + "narHash": "sha256-cfgtLNCBLFx2qOzRLI6DHfqTdfWI+UbvsKYa3b3fvaA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2646b294a146df2781b1ca49092450e8a32814e1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { + "locked": { + "lastModified": 1697456312, + "narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ca012a02bf8327be9e488546faecae5e05d7d749", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1689261696, + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1644525281, + "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1679198465, + "narHash": "sha256-VfXpHpniNWgg7pBzxb20pRX7kqn80LApPDQYTReiFCw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5a05160f7671434e1c833b1b01284b876e04eca4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1697009197, + "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1644525281, + "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1686701582, + "narHash": "sha256-uCj6bWmhb2RF+kmCP7T5ov5pg3HjksIyv4WDsCHZQyU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "55843b93856ad113166142cb3d2b01ffdcdf5de0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1696757521, + "narHash": "sha256-cfgtLNCBLFx2qOzRLI6DHfqTdfWI+UbvsKYa3b3fvaA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2646b294a146df2781b1ca49092450e8a32814e1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1644525281, + "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1696846637, + "narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "feedback": "feedback", + "flake-parts": "flake-parts", + "flake-to-gitlab-ci": "flake-to-gitlab-ci", + "horizon-gen-nix": "horizon-gen-nix", + "horizon-shell": "horizon-shell", + "nixpkgs": "nixpkgs_15" + } + }, + "safe-coloured-text": { + "flake": false, + "locked": { + "lastModified": 1696884906, + "narHash": "sha256-7CanCNOCB5gFwqhEPFIoOojoM1iVJZKF5YRy7unUDuo=", + "owner": "NorfairKing", + "repo": "safe-coloured-text", + "rev": "50abcbfa2a2ed15c6186fa2381fe818bd93a730b", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "safe-coloured-text", + "type": "github" + } + }, + "sydtest": { + "flake": false, + "locked": { + "lastModified": 1696883645, + "narHash": "sha256-Yr5piSv96hgKC7z7aHqo8kMKJPyL8ZG2lbDb7oFUZxw=", + "owner": "NorfairKing", + "repo": "sydtest", + "rev": "6313c1b211d14c1215cdf97b9933675cf9c2adb9", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "sydtest", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "validity": { + "flake": false, + "locked": { + "lastModified": 1696884006, + "narHash": "sha256-w2dKXZrNxXm/hsYkef5ZLTDxm3IsIzdj3i2qc1GC+A8=", + "owner": "NorfairKing", + "repo": "validity", + "rev": "34e17fe6d92765209f1db8127aee13c74285805d", + "type": "github" + }, + "original": { + "owner": "NorfairKing", + "repo": "validity", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/develop/flake.nix b/develop/flake.nix new file mode 100644 index 00000000..6e16f010 --- /dev/null +++ b/develop/flake.nix @@ -0,0 +1,96 @@ +{ + + nixConfig = { + extra-substituters = "https://horizon.cachix.org"; + extra-trusted-public-keys = "horizon.cachix.org-1:MeEEDRhRZTgv/FFGCv3479/dmJDfJ82G6kfUDxMSAw0="; + }; + + inputs = { + feedback.url = "github:NorfairKing/feedback"; + flake-parts.url = "github:hercules-ci/flake-parts"; + flake-to-gitlab-ci.url = "git+https://gitlab.nixica.dev/haskell/flake-to-gitlab-ci?ref=refs/tags/0.2.4.2"; + horizon-gen-nix.url = "git+https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix?ref=refs/tags/0.11.0"; + horizon-shell.url = "git+https://gitlab.horizon-haskell.net/shells/horizon-shell?ref=refs/tags/0.0.9"; + 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" + ]; + perSystem = { system, pkgs, ... }: + let + cachix-push-horizon-ghc-only = pkgs.writers.writeBashBin "cachix-push-horizon-ghc-only" '' + nix build -L --json .#packages.x86_64-linux.ghc | ${pkgs.jq}/bin/jq -r '.[].outputs | to_entries[].value' | ${pkgs.cachix}/bin/cachix push horizon + ''; + + cachix-push-horizon-devour = pkgs.writers.writeBashBin "cachix-push-horizon-devour" '' + nix build github:srid/devour-flake -L --no-link --print-out-paths --override-input flake . | xargs cat | ${pkgs.cachix}/bin/cachix push horizon + ''; + + devour-flake = pkgs.writers.writeBashBin "devour-flake" '' + nix build github:srid/devour-flake -L --no-link --print-out-paths --override-input flake . --keep-going + ''; + + test-template = pkgs.writers.writeBashBin "test-template" '' + mkdir temp + cd temp + nix flake init -t 'git+https://gitlab.horizon-haskell.net/templates/horizon-templates#minimal' + git init . + git add * + nix build github:srid/devour-flake -L --no-link --print-out-paths --override-input flake . --override-input flake/horizon-platform ../ --keep-going + cd .. + rm temp -rf + ''; + + run-horizon-gen-nix = pkgs.writers.writeBashBin "run-horizon-gen-nix" '' + ${pkgs.cabal-install}/bin/cabal update + ${inputs.horizon-gen-nix.packages.${system}.default}/bin/horizon-gen-nix $@; + ''; + + in + { + + apps = { + cachix-push-horizon-devour = { + type = "app"; + program = "${cachix-push-horizon-devour}/bin/cachix-push-horizon-devour"; + }; + cachix-push-horizon-ghc-only = { + type = "app"; + program = "${cachix-push-horizon-ghc-only}/bin/cachix-push-horizon-ghc-only"; + }; + devour-flake = { + type = "app"; + program = "${devour-flake}/bin/devour-flake"; + }; + feedback = { + type = "app"; + program = "${inputs.feedback.packages.${system}.default}/bin/feedback"; + }; + flake-to-gitlab-ci = inputs.flake-to-gitlab-ci.apps.${system}.default; + horizon-gen-nix = inputs.horizon-gen-nix.apps.${system}.default; + horizon-shell = inputs.horizon-shell.apps.${system}.default; + run-horizon-gen-nix = { + program = "${run-horizon-gen-nix}/bin/run-horizon-gen-nix"; + type = "app"; + }; + test-template = { + type = "app"; + program = "${test-template}/bin/test-template"; + }; + }; + + }; + }; +} -- GitLab