From 49d508b37c3cdbb95007112b811e165fcf6cb51c Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Fri, 22 Jul 2022 15:41:43 +1000 Subject: [PATCH 01/23] nix: converted to flake --- .envrc | 4 +- flake.lock | 449 +++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 11 ++ outputs.nix | 27 +++ shell.nix | 13 +- skeleton-web.cabal | 2 +- treefmt.toml | 3 + 7 files changed, 505 insertions(+), 4 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 outputs.nix create mode 100644 treefmt.toml diff --git a/.envrc b/.envrc index 18f695a..005a801 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,2 @@ -use nix -watch_file nix/* +use flake +watch_file flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5d5d99e --- /dev/null +++ b/flake.lock @@ -0,0 +1,449 @@ +{ + "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": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-36": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "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-utils": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "ghc-8.6.5-iohk": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "hackage": { + "flake": false, + "locked": { + "lastModified": 1658366907, + "narHash": "sha256-P895BKdjuH1/UtRZi1dCN15rP5VXlOG9IaDYjbIBSBw=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "699f31598daf8fd452c5bfa46284dced1826fb8d", + "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-utils": "flake-utils", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "hackage": "hackage", + "hpc-coveralls": "hpc-coveralls", + "hydra": "hydra", + "nix-tools": "nix-tools", + "nixpkgs": [ + "haskellNix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003", + "nixpkgs-2105": "nixpkgs-2105", + "nixpkgs-2111": "nixpkgs-2111", + "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-unstable": "nixpkgs-unstable", + "old-ghc-nix": "old-ghc-nix", + "stackage": "stackage" + }, + "locked": { + "lastModified": 1658367065, + "narHash": "sha256-d0IvSkpkOd8eegnUsrkWY5WZe6N4A8VnlPDa9qJFSBE=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "a25983e8ab2e74f0e00f45a913a31492f59d65cd", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "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" + } + }, + "hydra": { + "inputs": { + "nix": "nix", + "nixpkgs": [ + "haskellNix", + "hydra", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1646878427, + "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", + "owner": "NixOS", + "repo": "hydra", + "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "type": "github" + }, + "original": { + "id": "hydra", + "type": "indirect" + } + }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1643066034, + "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "owner": "NixOS", + "repo": "nix", + "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "2.6.0", + "repo": "nix", + "type": "github" + } + }, + "nix-tools": { + "flake": false, + "locked": { + "lastModified": 1649424170, + "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-21.05-small", + "type": "indirect" + } + }, + "nixpkgs-2003": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105": { + "locked": { + "lastModified": 1655034179, + "narHash": "sha256-rf1/7AbzuYDw6+8Xvvf3PtEOygymLBrFsFxvext5ZjI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "046ee4af7a9f016a364f8f78eeaa356ba524ac31", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111": { + "locked": { + "lastModified": 1656782578, + "narHash": "sha256-1eMCBEqJplPotTo/SZ/t5HU6Sf2I8qKlZi9MX7jv9fw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2205": { + "locked": { + "lastModified": 1657876628, + "narHash": "sha256-URmf0O2cQ/3heg2DJOeLyU/JmfVMqG4X5t9crQXMaeY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "549d82bdd40f760a438c3c3497c1c61160f3de55", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "indirect" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1657888067, + "narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1658321858, + "narHash": "sha256-2f5NzHbi1NLSYnDg6cRu25B+XRxqngicvggg+0GgKHI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "26fe7618c7efbbfe28db9a52a21fb87e67ebaf06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05", + "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": { + "haskellNix": "haskellNix", + "nixpkgs": "nixpkgs_2", + "utils": "utils" + } + }, + "stackage": { + "flake": false, + "locked": { + "lastModified": 1658366999, + "narHash": "sha256-8W0JtlRvwYcp7rSxAY2U2vBUhyoiBM0tGIyFMXyaglo=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "edb1661ad59828f47f7587b34dbe011ceac597c5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2795d13 --- /dev/null +++ b/flake.nix @@ -0,0 +1,11 @@ +{ + description = "JFDI Collective hakyll skeleton website"; + + inputs = { + haskellNix.url = "github:input-output-hk/haskell.nix"; + nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = {...} @ args: import ./outputs.nix args; +} diff --git a/outputs.nix b/outputs.nix new file mode 100644 index 0000000..8dae03a --- /dev/null +++ b/outputs.nix @@ -0,0 +1,27 @@ +{ self, nixpkgs, utils, haskellNix }@ inputs: + utils.lib.eachDefaultSystem (system: + let + overlay = self: _: { + hsPkgs = + self.haskell-nix.project' rec { + src = ./.; + compiler-nix-name = "ghc8107"; + }; + }; + pkgs = import nixpkgs { + inherit system; + overlays = [ + haskellNix.overlay + overlay + ]; + }; + flake = pkgs.hsPkgs.flake { }; + in + flake // { + packages.default = flake.packages."skeleton-web:exe:site"; + apps.default = { + type = "app"; + program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; + }; + } + ) diff --git a/shell.nix b/shell.nix index bc6afd2..aad4bcf 100644 --- a/shell.nix +++ b/shell.nix @@ -1 +1,12 @@ -(import ./release.nix { }).shell +{ + pkgs ? import {}, + alejandra, + mkShell, +}: +with pkgs; + mkShell { + buildInputs = [ + alejandra # The Uncompromising Nix Code Formatter + treefmt # one CLI to format the code tree + ]; + } diff --git a/skeleton-web.cabal b/skeleton-web.cabal index e4a63e2..81727c0 100644 --- a/skeleton-web.cabal +++ b/skeleton-web.cabal @@ -1,5 +1,5 @@ name: skeleton-web -version: 0.1.0.0 +version: 0.1.1.0 build-type: Simple cabal-version: >= 1.10 diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..fe5d1f3 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,3 @@ +[formatter.nix] +command = "alejandra" +includes = ["*.nix"] From 320b74fa8125a62da3b099fd923ee521b1ab4f83 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Fri, 22 Jul 2022 15:59:02 +1000 Subject: [PATCH 02/23] nix: removed legacy files --- default.nix | 22 ------ nix/sources.json | 26 ------- nix/sources.nix | 174 ----------------------------------------------- release.nix | 35 ---------- shell.nix | 12 ---- skeleton-web.nix | 11 --- 6 files changed, 280 deletions(-) delete mode 100644 default.nix delete mode 100644 nix/sources.json delete mode 100644 nix/sources.nix delete mode 100644 release.nix delete mode 100644 shell.nix delete mode 100644 skeleton-web.nix diff --git a/default.nix b/default.nix deleted file mode 100644 index 40944ab..0000000 --- a/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ nixpkgs ? import { }, compiler ? "default" }: -let - inherit (nixpkgs) pkgs; - haskellPackages = if compiler == "default" then - pkgs.haskellPackages - else - pkgs.haskell.packages.${compiler}; - skeleton-org = haskellPackages.callPackage ./skeleton-web.nix { }; -in nixpkgs.stdenv.mkDerivation { - name = "skeleton-org-website"; - buildInputs = [ skeleton-org ]; - src = ./.; - buildPhase = '' - echo "Setting LC_ALL to C.UTF-8 to avoid invalid byte sequence." - export LC_ALL=C.UTF-8 - site build - ''; - installPhase = '' - mkdir $out - cp -R _site/* $out - ''; -} diff --git a/nix/sources.json b/nix/sources.json deleted file mode 100644 index bbd0dd1..0000000 --- a/nix/sources.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "niv": { - "branch": "master", - "description": "Easy dependency management for Nix projects", - "homepage": "https://github.com/nmattia/niv", - "owner": "nmattia", - "repo": "niv", - "rev": "dd13098d01eaa6be68237e7e38f96782b0480755", - "sha256": "1cfjdbsn0219fjzam1k7nqzkz8fb1ypab50rhyj026qbklqq2kvq", - "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/dd13098d01eaa6be68237e7e38f96782b0480755.tar.gz", - "url_template": "https://github.com///archive/.tar.gz" - }, - "nixpkgs": { - "branch": "nixos-23.11", - "description": "Nix Packages collection", - "homepage": "", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", - "sha256": "01g1lcpc281ba2dll1bkdxjn9w7dric0nk0zwm8dgrjxhad90zhb", - "type": "tarball", - "url": "https://github.com/nixos/nixpkgs/archive/c1be43e8e837b8dbee2b3665a007e761680f0c3d.tar.gz", - "url_template": "https://github.com///archive/.tar.gz" - } -} diff --git a/nix/sources.nix b/nix/sources.nix deleted file mode 100644 index 1938409..0000000 --- a/nix/sources.nix +++ /dev/null @@ -1,174 +0,0 @@ -# This file has been generated by Niv. - -let - - # - # The fetchers. fetch_ fetches specs of type . - # - - fetch_file = pkgs: name: spec: - let - name' = sanitizeName name + "-src"; - in - if spec.builtin or true then - builtins_fetchurl { inherit (spec) url sha256; name = name'; } - else - pkgs.fetchurl { inherit (spec) url sha256; name = name'; }; - - fetch_tarball = pkgs: name: spec: - let - name' = sanitizeName name + "-src"; - in - if spec.builtin or true then - builtins_fetchTarball { name = name'; inherit (spec) url sha256; } - else - pkgs.fetchzip { name = name'; inherit (spec) url sha256; }; - - fetch_git = name: spec: - let - ref = - if spec ? ref then spec.ref else - if spec ? branch then "refs/heads/${spec.branch}" else - if spec ? tag then "refs/tags/${spec.tag}" else - abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"; - in - builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; }; - - fetch_local = spec: spec.path; - - fetch_builtin-tarball = name: throw - ''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=tarball -a builtin=true''; - - fetch_builtin-url = name: throw - ''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=file -a builtin=true''; - - # - # Various helpers - # - - # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695 - sanitizeName = name: - ( - concatMapStrings (s: if builtins.isList s then "-" else s) - ( - builtins.split "[^[:alnum:]+._?=-]+" - ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name) - ) - ); - - # The set of packages used when specs are fetched using non-builtins. - mkPkgs = sources: system: - let - sourcesNixpkgs = - import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; }; - hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; - hasThisAsNixpkgsPath = == ./.; - in - if builtins.hasAttr "nixpkgs" sources - then sourcesNixpkgs - else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then - import {} - else - abort - '' - Please specify either (through -I or NIX_PATH=nixpkgs=...) or - add a package called "nixpkgs" to your sources.json. - ''; - - # The actual fetching function. - fetch = pkgs: name: spec: - - if ! builtins.hasAttr "type" spec then - abort "ERROR: niv spec ${name} does not have a 'type' attribute" - else if spec.type == "file" then fetch_file pkgs name spec - else if spec.type == "tarball" then fetch_tarball pkgs name spec - else if spec.type == "git" then fetch_git name spec - else if spec.type == "local" then fetch_local spec - else if spec.type == "builtin-tarball" then fetch_builtin-tarball name - else if spec.type == "builtin-url" then fetch_builtin-url name - else - abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}"; - - # If the environment variable NIV_OVERRIDE_${name} is set, then use - # the path directly as opposed to the fetched source. - replace = name: drv: - let - saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name; - ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}"; - in - if ersatz == "" then drv else - # this turns the string into an actual Nix path (for both absolute and - # relative paths) - if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}"; - - # Ports of functions for older nix versions - - # a Nix version of mapAttrs if the built-in doesn't exist - mapAttrs = builtins.mapAttrs or ( - f: set: with builtins; - listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)) - ); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 - stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 - stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); - concatMapStrings = f: list: concatStrings (map f list); - concatStrings = builtins.concatStringsSep ""; - - # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331 - optionalAttrs = cond: as: if cond then as else {}; - - # fetchTarball version that is compatible between all the versions of Nix - builtins_fetchTarball = { url, name ? null, sha256 }@attrs: - let - inherit (builtins) lessThan nixVersion fetchTarball; - in - if lessThan nixVersion "1.12" then - fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchTarball attrs; - - # fetchurl version that is compatible between all the versions of Nix - builtins_fetchurl = { url, name ? null, sha256 }@attrs: - let - inherit (builtins) lessThan nixVersion fetchurl; - in - if lessThan nixVersion "1.12" then - fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchurl attrs; - - # Create the final "sources" from the config - mkSources = config: - mapAttrs ( - name: spec: - if builtins.hasAttr "outPath" spec - then abort - "The values in sources.json should not have an 'outPath' attribute" - else - spec // { outPath = replace name (fetch config.pkgs name spec); } - ) config.sources; - - # The "config" used by the fetchers - mkConfig = - { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null - , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile) - , system ? builtins.currentSystem - , pkgs ? mkPkgs sources system - }: rec { - # The sources, i.e. the attribute set of spec name to spec - inherit sources; - - # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers - inherit pkgs; - }; - -in -mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } diff --git a/release.nix b/release.nix deleted file mode 100644 index 567887f..0000000 --- a/release.nix +++ /dev/null @@ -1,35 +0,0 @@ -let sources = import ./nix/sources.nix; -in { compiler ? "ghc902", pkgs ? import sources.nixpkgs { } }: - -let - inherit (pkgs.lib.trivial) flip pipe; - inherit (pkgs.haskell.lib) appendPatch appendConfigureFlags; - - haskellPackages = pkgs.haskell.packages.${compiler}.override { - overrides = hpNew: hpOld: { - hakyll = pipe hpOld.hakyll [ - (flip appendPatch ./hakyll.patch) - (flip appendConfigureFlags [ "-f" "watchServer" "-f" "previewServer" ]) - ]; - - skeleton-web = hpNew.callCabal2nix "skeleton-web" ./. { }; - - niv = import sources.niv { }; - }; - }; - - project = haskellPackages.skeleton-web; -in { - project = project; - - shell = haskellPackages.shellFor { - packages = p: with p; [ project ]; - buildInputs = with haskellPackages; [ - ghcid # GHCi based IDE - hlint # or ormolu - pkgs.niv # Nix dependency management - pkgs.tea # Gitea official CLI client - ]; - withHoogle = true; - }; -} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index aad4bcf..0000000 --- a/shell.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - pkgs ? import {}, - alejandra, - mkShell, -}: -with pkgs; - mkShell { - buildInputs = [ - alejandra # The Uncompromising Nix Code Formatter - treefmt # one CLI to format the code tree - ]; - } diff --git a/skeleton-web.nix b/skeleton-web.nix deleted file mode 100644 index 5d6b33a..0000000 --- a/skeleton-web.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ mkDerivation, base, hakyll, stdenv }: -mkDerivation { - pname = "skeleton-web"; - version = "0.1.0.0"; - src = ./.; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ base hakyll ]; - license = "unknown"; - hydraPlatforms = stdenv.lib.platforms.none; -} From b1f14470acfa67b5198726d938ab8f1789b1734f Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 2 May 2023 13:28:43 +1000 Subject: [PATCH 03/23] nix: added a basic shell providing nix & tea progresses #1 --- outputs.nix | 1 + shell.nix | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 shell.nix diff --git a/outputs.nix b/outputs.nix index 8dae03a..0714f51 100644 --- a/outputs.nix +++ b/outputs.nix @@ -23,5 +23,6 @@ type = "app"; program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; }; + devShell = pkgs.callPackage ./shell.nix {}; } ) diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..761e3a3 --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +{ + pkgs ? import {}, + mkShell, +}: +with pkgs; + mkShell { + buildInputs = [ + nix # Powerful package manager, makes packaging reliable & reproducible + tea # Gitea official CLI client + ]; + } From 065ac2601437569f51bc3bdd7e17450c151d9028 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 2 May 2023 13:35:32 +1000 Subject: [PATCH 04/23] nix: added treefmt and Nix formatter progresses #1 --- shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.nix b/shell.nix index 761e3a3..1ca9028 100644 --- a/shell.nix +++ b/shell.nix @@ -7,5 +7,6 @@ with pkgs; buildInputs = [ nix # Powerful package manager, makes packaging reliable & reproducible tea # Gitea official CLI client + treefmt # one CLI to format the code tree ]; } From edee81e0583f2f0d861e9897749048295b821395 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 2 May 2023 14:17:42 +1000 Subject: [PATCH 05/23] haskell: added stylish-haskell progresses #1 --- .stylish-haskell.yaml | 101 ++++++++++++++++++++++++++++++++++++++++++ outputs.nix | 4 +- shell.nix | 2 + treefmt.toml | 6 +++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 .stylish-haskell.yaml diff --git a/.stylish-haskell.yaml b/.stylish-haskell.yaml new file mode 100644 index 0000000..73b4d95 --- /dev/null +++ b/.stylish-haskell.yaml @@ -0,0 +1,101 @@ +# Stylish-haskell configuration file. + +# Principles: +# +# 1. Amount of indent should not be dependent on the length of the previous line +# 2. Imports lists should be compact +# 3. All linting rules that delete comments should be disabled +# 4. No inline indenting, for example indent of ->, =, <-, as +# 5. Redunant imports and pragmas should be removed +# 6. Consistent syntax +# 7. No trailing whitespaces +# 8. Slightly generous screen with assumed +# 9. All Haskell files in the project are subject to code formatting style + +steps: + # Principle 4 + - simple_align: + cases: false + top_level_patterns: false + # Principle 3 + records: false + + # Import cleanup + - imports: + align: global + + # Principle 1,2 + list_align: with_module_name + + # Principle 4 + pad_module_names: false + + # Principle 2 + long_list_align: inline + + empty_list_align: inherit + + list_padding: 2 + + separate_lists: true + + space_surround: false + + - language_pragmas: + style: vertical + + align: false + + # Principle 5 + remove_redundant: true + + # Principle 6 + language_prefix: LANGUAGE + + # Principle 7 + - trailing_whitespace: {} + +# Principle 8 +columns: 100 + +newline: native + +# Principle 9 +# +# These syntax-affecting language extensions are enabled so that +# stylish-haskell wouldn't fail with parsing errors when processing files +# in projects that have those extensions enabled in the .cabal file +# rather than locally. +# +# In particular language extensions with British and American spellings +# that we use should be included here until stylish-haskell supports +# the British spelling. +language_extensions: + - BangPatterns + - ConstraintKinds + - DataKinds + - DefaultSignatures + - DeriveDataTypeable + - DeriveGeneric + - ExistentialQuantification + - FlexibleContexts + - FlexibleInstances + - FunctionalDependencies + - GADTs + - GeneralizedNewtypeDeriving + - LambdaCase + - MultiParamTypeClasses + - MultiWayIf + - OverloadedStrings + - PolyKinds + - RecordWildCards + - ScopedTypeVariables + - StandaloneDeriving + - TemplateHaskell + - TupleSections + - TypeApplications + - TypeFamilies + - ViewPatterns + - ExplicitNamespaces + +cabal: true diff --git a/outputs.nix b/outputs.nix index 0714f51..a38fb63 100644 --- a/outputs.nix +++ b/outputs.nix @@ -23,6 +23,8 @@ type = "app"; program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; }; - devShell = pkgs.callPackage ./shell.nix {}; + devShell = pkgs.callPackage ./shell.nix { + inherit (haskellNix.legacyPackages."${pkgs.system}") stylish-haskell; + }; } ) diff --git a/shell.nix b/shell.nix index 1ca9028..5611752 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,13 @@ { pkgs ? import {}, mkShell, + stylish-haskell, }: with pkgs; mkShell { buildInputs = [ nix # Powerful package manager, makes packaging reliable & reproducible + stylish-haskell # A simple Haskell code prettifier tea # Gitea official CLI client treefmt # one CLI to format the code tree ]; diff --git a/treefmt.toml b/treefmt.toml index fe5d1f3..189c48b 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -1,3 +1,9 @@ +[formatter.haskell] +command = "stylish-haskell" +options = [ "--inplace" ] +includes = ["*.hs"] + [formatter.nix] command = "alejandra" includes = ["*.nix"] + From 8fea486e22624db97640a7a5ec617cb2260fa597 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 2 May 2023 19:04:25 +1000 Subject: [PATCH 06/23] haskellNix: updated to HEAD progresses #2 --- flake.lock | 626 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 566 insertions(+), 60 deletions(-) diff --git a/flake.lock b/flake.lock index 5d5d99e..2dd451b 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,21 @@ "type": "github" } }, + "blank": { + "locked": { + "lastModified": 1625557891, + "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", + "owner": "divnix", + "repo": "blank", + "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "blank", + "type": "github" + } + }, "cabal-32": { "flake": false, "locked": { @@ -36,11 +51,11 @@ "cabal-34": { "flake": false, "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "lastModified": 1645834128, + "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", "owner": "haskell", "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", "type": "github" }, "original": { @@ -53,11 +68,11 @@ "cabal-36": { "flake": false, "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "lastModified": 1669081697, + "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", "owner": "haskell", "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", "type": "github" }, "original": { @@ -83,13 +98,135 @@ "type": "github" } }, + "devshell": { + "inputs": { + "flake-utils": [ + "haskellNix", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1663445644, + "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", + "owner": "numtide", + "repo": "devshell", + "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "dmerge": { + "inputs": { + "nixlib": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ], + "yants": [ + "haskellNix", + "tullia", + "std", + "yants" + ] + }, + "locked": { + "lastModified": 1659548052, + "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", + "owner": "divnix", + "repo": "data-merge", + "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "data-merge", + "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-compat_2": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1679360468, + "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", + "owner": "hamishmack", + "repo": "flake-utils", + "rev": "e1ea268ff47ad475443dbabcd54744b4e5b9d4f5", + "type": "github" + }, + "original": { + "owner": "hamishmack", + "ref": "hkm/nested-hydraJobs", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -115,14 +252,33 @@ "type": "github" } }, + "gomod2nix": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1655245309, + "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", + "owner": "tweag", + "repo": "gomod2nix", + "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", + "type": "github" + }, + "original": { + "owner": "tweag", + "repo": "gomod2nix", + "type": "github" + } + }, "hackage": { "flake": false, "locked": { - "lastModified": 1658366907, - "narHash": "sha256-P895BKdjuH1/UtRZi1dCN15rP5VXlOG9IaDYjbIBSBw=", + "lastModified": 1682987221, + "narHash": "sha256-v0RmADdFtkCF4qqibiND6cdtTzugulReHqE7f3I2juI=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "699f31598daf8fd452c5bfa46284dced1826fb8d", + "rev": "dec495c922e73f15cbad458c9e3ff301f1fbf13d", "type": "github" }, "original": { @@ -138,12 +294,14 @@ "cabal-34": "cabal-34", "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", + "flake-compat": "flake-compat", "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", + "hls-1.10": "hls-1.10", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", - "nix-tools": "nix-tools", + "iserv-proxy": "iserv-proxy", "nixpkgs": [ "haskellNix", "nixpkgs-unstable" @@ -152,16 +310,18 @@ "nixpkgs-2105": "nixpkgs-2105", "nixpkgs-2111": "nixpkgs-2111", "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage" + "stackage": "stackage", + "tullia": "tullia" }, "locked": { - "lastModified": 1658367065, - "narHash": "sha256-d0IvSkpkOd8eegnUsrkWY5WZe6N4A8VnlPDa9qJFSBE=", + "lastModified": 1682988648, + "narHash": "sha256-d3n6PtnSZ3yJ7hQhPZ629SicW0iqE81fL7/9w3Vv+xM=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "a25983e8ab2e74f0e00f45a913a31492f59d65cd", + "rev": "e7534ee311149604ba85aec23b53c613ddaca8cb", "type": "github" }, "original": { @@ -170,6 +330,23 @@ "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" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -197,11 +374,11 @@ ] }, "locked": { - "lastModified": 1646878427, - "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", + "lastModified": 1671755331, + "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", "owner": "NixOS", "repo": "hydra", - "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", "type": "github" }, "original": { @@ -209,6 +386,46 @@ "type": "indirect" } }, + "incl": { + "inputs": { + "nixlib": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1669263024, + "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", + "owner": "divnix", + "repo": "incl", + "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "incl", + "type": "github" + } + }, + "iserv-proxy": { + "flake": false, + "locked": { + "lastModified": 1670983692, + "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", + "ref": "hkm/remote-iserv", + "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", + "revCount": 10, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + }, + "original": { + "ref": "hkm/remote-iserv", + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + } + }, "lowdown-src": { "flake": false, "locked": { @@ -225,6 +442,35 @@ "type": "github" } }, + "n2c": { + "inputs": { + "flake-utils": [ + "haskellNix", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1665039323, + "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, "nix": { "inputs": { "lowdown-src": "lowdown-src", @@ -232,49 +478,123 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "lastModified": 1661606874, + "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", "owner": "NixOS", "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.6.0", + "ref": "2.11.0", "repo": "nix", "type": "github" } }, - "nix-tools": { - "flake": false, + "nix-nomad": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": [ + "haskellNix", + "tullia", + "nix2container", + "flake-utils" + ], + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "haskellNix", + "tullia", + "nixpkgs" + ], + "nixpkgs-lib": [ + "haskellNix", + "tullia", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1649424170, - "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", + "lastModified": 1658277770, + "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", + "owner": "tristanpemble", + "repo": "nix-nomad", + "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "nix-tools", + "owner": "tristanpemble", + "repo": "nix-nomad", + "type": "github" + } + }, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1658567952, + "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, + "nixago": { + "inputs": { + "flake-utils": [ + "haskellNix", + "tullia", + "std", + "flake-utils" + ], + "nixago-exts": [ + "haskellNix", + "tullia", + "std", + "blank" + ], + "nixpkgs": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1661824785, + "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", + "owner": "nix-community", + "repo": "nixago", + "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "lastModified": 1657693803, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-21.05-small", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-2003": { @@ -295,11 +615,11 @@ }, "nixpkgs-2105": { "locked": { - "lastModified": 1655034179, - "narHash": "sha256-rf1/7AbzuYDw6+8Xvvf3PtEOygymLBrFsFxvext5ZjI=", + "lastModified": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "046ee4af7a9f016a364f8f78eeaa356ba524ac31", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", "type": "github" }, "original": { @@ -311,11 +631,11 @@ }, "nixpkgs-2111": { "locked": { - "lastModified": 1656782578, - "narHash": "sha256-1eMCBEqJplPotTo/SZ/t5HU6Sf2I8qKlZi9MX7jv9fw=", + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", "type": "github" }, "original": { @@ -327,11 +647,11 @@ }, "nixpkgs-2205": { "locked": { - "lastModified": 1657876628, - "narHash": "sha256-URmf0O2cQ/3heg2DJOeLyU/JmfVMqG4X5t9crQXMaeY=", + "lastModified": 1672580127, + "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "549d82bdd40f760a438c3c3497c1c61160f3de55", + "rev": "0874168639713f547c05947c76124f78441ea46c", "type": "github" }, "original": { @@ -341,6 +661,22 @@ "type": "github" } }, + "nixpkgs-2211": { + "locked": { + "lastModified": 1675730325, + "narHash": "sha256-uNvD7fzO5hNlltNQUAFBPlcEjNG5Gkbhl/ROiX+GZU4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b7ce17b1ebf600a72178f6302c77b6382d09323f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -351,18 +687,19 @@ "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "NixOS", + "repo": "nixpkgs", "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" + "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1657888067, - "narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=", + "lastModified": 1675758091, + "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e", + "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", "type": "github" }, "original": { @@ -374,8 +711,55 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1658321858, - "narHash": "sha256-2f5NzHbi1NLSYnDg6cRu25B+XRxqngicvggg+0GgKHI=", + "lastModified": 1653581809, + "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1654807842, + "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1665087388, + "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1682817260, + "narHash": "sha256-kFMXzKNj4d/0Iqbm5l57rHSLyUeyCLMuvlROZIuuhvk=", "owner": "NixOS", "repo": "nixpkgs", "rev": "26fe7618c7efbbfe28db9a52a21fb87e67ebaf06", @@ -388,6 +772,21 @@ "type": "github" } }, + "nosys": { + "locked": { + "lastModified": 1667881534, + "narHash": "sha256-FhwJ15uPLRsvaxtt/bNuqE/ykMpNAPF0upozFKhTtXM=", + "owner": "divnix", + "repo": "nosys", + "rev": "2d0d5207f6a230e9d0f660903f8db9807b54814f", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "nosys", + "type": "github" + } + }, "old-ghc-nix": { "flake": false, "locked": { @@ -408,18 +807,18 @@ "root": { "inputs": { "haskellNix": "haskellNix", - "nixpkgs": "nixpkgs_2", - "utils": "utils" + "nixpkgs": "nixpkgs_5", + "utils": "utils_2" } }, "stackage": { "flake": false, "locked": { - "lastModified": 1658366999, - "narHash": "sha256-8W0JtlRvwYcp7rSxAY2U2vBUhyoiBM0tGIyFMXyaglo=", + "lastModified": 1682986174, + "narHash": "sha256-BWDGwC165w9qtQL5EVnAM9imWrhQhWt7belkNHGmv68=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "edb1661ad59828f47f7587b34dbe011ceac597c5", + "rev": "f0691530f6dabfcbf08c7fcb68f6fff84ebc48a3", "type": "github" }, "original": { @@ -428,7 +827,91 @@ "type": "github" } }, + "std": { + "inputs": { + "arion": [ + "haskellNix", + "tullia", + "std", + "blank" + ], + "blank": "blank", + "devshell": "devshell", + "dmerge": "dmerge", + "flake-utils": "flake-utils_3", + "incl": "incl", + "makes": [ + "haskellNix", + "tullia", + "std", + "blank" + ], + "microvm": [ + "haskellNix", + "tullia", + "std", + "blank" + ], + "n2c": "n2c", + "nixago": "nixago", + "nixpkgs": "nixpkgs_4", + "nosys": "nosys", + "yants": "yants" + }, + "locked": { + "lastModified": 1674526466, + "narHash": "sha256-tMTaS0bqLx6VJ+K+ZT6xqsXNpzvSXJTmogkraBGzymg=", + "owner": "divnix", + "repo": "std", + "rev": "516387e3d8d059b50e742a2ff1909ed3c8f82826", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "std", + "type": "github" + } + }, + "tullia": { + "inputs": { + "nix-nomad": "nix-nomad", + "nix2container": "nix2container", + "nixpkgs": [ + "haskellNix", + "nixpkgs" + ], + "std": "std" + }, + "locked": { + "lastModified": 1675695930, + "narHash": "sha256-B7rEZ/DBUMlK1AcJ9ajnAPPxqXY6zW2SBX+51bZV0Ac=", + "owner": "input-output-hk", + "repo": "tullia", + "rev": "621365f2c725608f381b3ad5b57afef389fd4c31", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "tullia", + "type": "github" + } + }, "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { "locked": { "lastModified": 1656928814, "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", @@ -442,6 +925,29 @@ "repo": "flake-utils", "type": "github" } + }, + "yants": { + "inputs": { + "nixpkgs": [ + "haskellNix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1667096281, + "narHash": "sha256-wRRec6ze0gJHmGn6m57/zhz/Kdvp9HS4Nl5fkQ+uIuA=", + "owner": "divnix", + "repo": "yants", + "rev": "d18f356ec25cb94dc9c275870c3a7927a10f8c3c", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "yants", + "type": "github" + } } }, "root": "root", From f514c3da62301c1612e1e0248ce041f9e4200aca Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Wed, 10 Jan 2024 16:46:21 +1000 Subject: [PATCH 07/23] nixos: bumped to HEAD of 23.11 --- flake.lock | 661 ++++++++++++++--------------------------------------- flake.nix | 2 +- 2 files changed, 171 insertions(+), 492 deletions(-) diff --git a/flake.lock b/flake.lock index 2dd451b..d848547 100644 --- a/flake.lock +++ b/flake.lock @@ -16,21 +16,6 @@ "type": "github" } }, - "blank": { - "locked": { - "lastModified": 1625557891, - "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", - "owner": "divnix", - "repo": "blank", - "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "blank", - "type": "github" - } - }, "cabal-32": { "flake": false, "locked": { @@ -98,64 +83,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1663445644, - "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", - "owner": "numtide", - "repo": "devshell", - "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "dmerge": { - "inputs": { - "nixlib": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ], - "yants": [ - "haskellNix", - "tullia", - "std", - "yants" - ] - }, - "locked": { - "lastModified": 1659548052, - "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", - "owner": "divnix", - "repo": "data-merge", - "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "data-merge", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -173,68 +100,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1679360468, - "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", - "owner": "hamishmack", - "repo": "flake-utils", - "rev": "e1ea268ff47ad475443dbabcd54744b4e5b9d4f5", - "type": "github" - }, - "original": { - "owner": "hamishmack", - "ref": "hkm/nested-hydraJobs", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "ghc-8.6.5-iohk": { "flake": false, "locked": { @@ -252,33 +117,51 @@ "type": "github" } }, - "gomod2nix": { - "inputs": { - "nixpkgs": "nixpkgs_2", - "utils": "utils" - }, + "ghc98X": { + "flake": false, "locked": { - "lastModified": 1655245309, - "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", - "owner": "tweag", - "repo": "gomod2nix", - "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", - "type": "github" + "lastModified": 1696643148, + "narHash": "sha256-E02DfgISH7EvvNAu0BHiPvl1E5FGMDi0pWdNZtIBC9I=", + "ref": "ghc-9.8", + "rev": "443e870d977b1ab6fc05f47a9a17bc49296adbd6", + "revCount": 61642, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" }, "original": { - "owner": "tweag", - "repo": "gomod2nix", - "type": "github" + "ref": "ghc-9.8", + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + } + }, + "ghc99": { + "flake": false, + "locked": { + "lastModified": 1701580282, + "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", + "ref": "refs/heads/master", + "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", + "revCount": 62197, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" } }, "hackage": { "flake": false, "locked": { - "lastModified": 1682987221, - "narHash": "sha256-v0RmADdFtkCF4qqibiND6cdtTzugulReHqE7f3I2juI=", + "lastModified": 1704759826, + "narHash": "sha256-T/HMYRVUqUDy5gzVj5n+UWZKbZlDgkQ/t7eND3yKo4k=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "dec495c922e73f15cbad458c9e3ff301f1fbf13d", + "rev": "1c6cbbcf3ae7152a377f540e9efb67b5452e678a", "type": "github" }, "original": { @@ -295,10 +178,15 @@ "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", - "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "ghc98X": "ghc98X", + "ghc99": "ghc99", "hackage": "hackage", "hls-1.10": "hls-1.10", + "hls-2.0": "hls-2.0", + "hls-2.2": "hls-2.2", + "hls-2.3": "hls-2.3", + "hls-2.4": "hls-2.4", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -311,17 +199,18 @@ "nixpkgs-2111": "nixpkgs-2111", "nixpkgs-2205": "nixpkgs-2205", "nixpkgs-2211": "nixpkgs-2211", + "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage", - "tullia": "tullia" + "stackage": "stackage" }, "locked": { - "lastModified": 1682988648, - "narHash": "sha256-d3n6PtnSZ3yJ7hQhPZ629SicW0iqE81fL7/9w3Vv+xM=", + "lastModified": 1704761375, + "narHash": "sha256-gd/QRNygBRT5URoWjk+Y0n2vstu8Rt4TNY3BLyV9XQM=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "e7534ee311149604ba85aec23b53c613ddaca8cb", + "rev": "7448cb3337456fbd8208b1c8f1db6b33654e03c0", "type": "github" }, "original": { @@ -347,6 +236,74 @@ "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.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" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -386,37 +343,14 @@ "type": "indirect" } }, - "incl": { - "inputs": { - "nixlib": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1669263024, - "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", - "owner": "divnix", - "repo": "incl", - "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "incl", - "type": "github" - } - }, "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1670983692, - "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", + "lastModified": 1691634696, + "narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=", "ref": "hkm/remote-iserv", - "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", - "revCount": 10, + "rev": "43a979272d9addc29fbffc2e8542c5d96e993d73", + "revCount": 14, "type": "git", "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" }, @@ -442,35 +376,6 @@ "type": "github" } }, - "n2c": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1665039323, - "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, "nix": { "inputs": { "lowdown-src": "lowdown-src", @@ -492,95 +397,6 @@ "type": "github" } }, - "nix-nomad": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": [ - "haskellNix", - "tullia", - "nix2container", - "flake-utils" - ], - "gomod2nix": "gomod2nix", - "nixpkgs": [ - "haskellNix", - "tullia", - "nixpkgs" - ], - "nixpkgs-lib": [ - "haskellNix", - "tullia", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1658277770, - "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", - "owner": "tristanpemble", - "repo": "nix-nomad", - "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", - "type": "github" - }, - "original": { - "owner": "tristanpemble", - "repo": "nix-nomad", - "type": "github" - } - }, - "nix2container": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1658567952, - "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, - "nixago": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixago-exts": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1661824785, - "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", - "owner": "nix-community", - "repo": "nixago", - "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixago", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1657693803, @@ -647,11 +463,11 @@ }, "nixpkgs-2205": { "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", + "lastModified": 1685573264, + "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", + "rev": "380be19fbd2d9079f677978361792cb25e8a3635", "type": "github" }, "original": { @@ -663,11 +479,11 @@ }, "nixpkgs-2211": { "locked": { - "lastModified": 1675730325, - "narHash": "sha256-uNvD7fzO5hNlltNQUAFBPlcEjNG5Gkbhl/ROiX+GZU4=", + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b7ce17b1ebf600a72178f6302c77b6382d09323f", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", "type": "github" }, "original": { @@ -677,6 +493,38 @@ "type": "github" } }, + "nixpkgs-2305": { + "locked": { + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-23.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2311": { + "locked": { + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-23.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -695,98 +543,36 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1675758091, - "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1653581809, - "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "lastModified": 1704420045, + "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1654807842, - "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1665087388, - "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1682817260, - "narHash": "sha256-kFMXzKNj4d/0Iqbm5l57rHSLyUeyCLMuvlROZIuuhvk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "26fe7618c7efbbfe28db9a52a21fb87e67ebaf06", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nosys": { - "locked": { - "lastModified": 1667881534, - "narHash": "sha256-FhwJ15uPLRsvaxtt/bNuqE/ykMpNAPF0upozFKhTtXM=", - "owner": "divnix", - "repo": "nosys", - "rev": "2d0d5207f6a230e9d0f660903f8db9807b54814f", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "nosys", - "type": "github" - } - }, "old-ghc-nix": { "flake": false, "locked": { @@ -807,18 +593,18 @@ "root": { "inputs": { "haskellNix": "haskellNix", - "nixpkgs": "nixpkgs_5", - "utils": "utils_2" + "nixpkgs": "nixpkgs_2", + "utils": "utils" } }, "stackage": { "flake": false, "locked": { - "lastModified": 1682986174, - "narHash": "sha256-BWDGwC165w9qtQL5EVnAM9imWrhQhWt7belkNHGmv68=", + "lastModified": 1704759004, + "narHash": "sha256-55urxC9WYrCA8enXRI0u328lDu6SdxoCP/U/q15wQdg=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "f0691530f6dabfcbf08c7fcb68f6fff84ebc48a3", + "rev": "8a9a68768d2d3b4e44f0fcf5ed371e2c04f5e475", "type": "github" }, "original": { @@ -827,91 +613,7 @@ "type": "github" } }, - "std": { - "inputs": { - "arion": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "blank": "blank", - "devshell": "devshell", - "dmerge": "dmerge", - "flake-utils": "flake-utils_3", - "incl": "incl", - "makes": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "microvm": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "n2c": "n2c", - "nixago": "nixago", - "nixpkgs": "nixpkgs_4", - "nosys": "nosys", - "yants": "yants" - }, - "locked": { - "lastModified": 1674526466, - "narHash": "sha256-tMTaS0bqLx6VJ+K+ZT6xqsXNpzvSXJTmogkraBGzymg=", - "owner": "divnix", - "repo": "std", - "rev": "516387e3d8d059b50e742a2ff1909ed3c8f82826", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "std", - "type": "github" - } - }, - "tullia": { - "inputs": { - "nix-nomad": "nix-nomad", - "nix2container": "nix2container", - "nixpkgs": [ - "haskellNix", - "nixpkgs" - ], - "std": "std" - }, - "locked": { - "lastModified": 1675695930, - "narHash": "sha256-B7rEZ/DBUMlK1AcJ9ajnAPPxqXY6zW2SBX+51bZV0Ac=", - "owner": "input-output-hk", - "repo": "tullia", - "rev": "621365f2c725608f381b3ad5b57afef389fd4c31", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "tullia", - "type": "github" - } - }, "utils": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { "locked": { "lastModified": 1656928814, "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", @@ -925,29 +627,6 @@ "repo": "flake-utils", "type": "github" } - }, - "yants": { - "inputs": { - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1667096281, - "narHash": "sha256-wRRec6ze0gJHmGn6m57/zhz/Kdvp9HS4Nl5fkQ+uIuA=", - "owner": "divnix", - "repo": "yants", - "rev": "d18f356ec25cb94dc9c275870c3a7927a10f8c3c", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "yants", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2795d13..b68b0a6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { haskellNix.url = "github:input-output-hk/haskell.nix"; - nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05; + nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-23.11; utils.url = "github:numtide/flake-utils"; }; From e5f3b9e050e74bdb6591b5d419f7ae3606eac497 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Thu, 11 Jan 2024 11:57:11 +1000 Subject: [PATCH 08/23] updated references to Reciproka Kolectivo --- css/skeleton.css | 2 +- flake.nix | 2 +- index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/css/skeleton.css b/css/skeleton.css index bed50f5..8eaaa45 100644 --- a/css/skeleton.css +++ b/css/skeleton.css @@ -1,5 +1,5 @@ /* - * JFDIC theme + * Reciproka Kolektivo theme */ /* diff --git a/flake.nix b/flake.nix index b68b0a6..19654e4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "JFDI Collective hakyll skeleton website"; + description = "Reciproka Kolektivo hakyll skeleton website"; inputs = { haskellNix.url = "github:input-output-hk/haskell.nix"; diff --git a/index.rst b/index.rst index 62763e9..43bedfd 100644 --- a/index.rst +++ b/index.rst @@ -1,5 +1,5 @@ --- -title: JFDI Collective +title: Reciproka Kolektivo --- Welcome. We just do things. From 85f4b39a07fee255b470a2e8fc985737b123bac9 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 23 Jan 2024 15:25:13 +1000 Subject: [PATCH 09/23] nix: overwrote devShells from haskell-nix resolves #6 --- outputs.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/outputs.nix b/outputs.nix index a38fb63..774db6e 100644 --- a/outputs.nix +++ b/outputs.nix @@ -17,13 +17,14 @@ }; flake = pkgs.hsPkgs.flake { }; in - flake // { + { packages.default = flake.packages."skeleton-web:exe:site"; apps.default = { type = "app"; program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; }; - devShell = pkgs.callPackage ./shell.nix { + # Overwrite devShells being inported from haskell-nix + devShells.default = pkgs.callPackage ./shell.nix { inherit (haskellNix.legacyPackages."${pkgs.system}") stylish-haskell; }; } From 3f3fd95ed12b1b6d1a08d00b3faa6e4b34b9e44f Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 23 Jan 2024 15:50:50 +1000 Subject: [PATCH 10/23] hakyll: bump to v4.16.x resolves #4 --- skeleton-web.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skeleton-web.cabal b/skeleton-web.cabal index 81727c0..729bd24 100644 --- a/skeleton-web.cabal +++ b/skeleton-web.cabal @@ -6,7 +6,7 @@ cabal-version: >= 1.10 executable site main-is: site.hs build-depends: base == 4.* - , hakyll == 4.15.* + , hakyll == 4.16.* , containers == 0.6.* , filepath == 1.4.* , pandoc From eed5ed7c9011c57619e1ad12e995a79810d3437e Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 23 Jan 2024 15:53:11 +1000 Subject: [PATCH 11/23] ghc: upgrade to v9.2.8 resolves #5 --- outputs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs.nix b/outputs.nix index 774db6e..faec93c 100644 --- a/outputs.nix +++ b/outputs.nix @@ -5,7 +5,7 @@ hsPkgs = self.haskell-nix.project' rec { src = ./.; - compiler-nix-name = "ghc8107"; + compiler-nix-name = "ghc928"; }; }; pkgs = import nixpkgs { From a915745a92320c5dca23e9b0f9f01ffaa21394e4 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Fri, 1 Mar 2024 16:14:40 +1000 Subject: [PATCH 12/23] shell: added zlib --- shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.nix b/shell.nix index 5611752..fdae90f 100644 --- a/shell.nix +++ b/shell.nix @@ -10,5 +10,6 @@ with pkgs; stylish-haskell # A simple Haskell code prettifier tea # Gitea official CLI client treefmt # one CLI to format the code tree + zlib # Lossless data-compression library ]; } From 3712dee790313c1c26cb8274e0eb439b714f4714 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Fri, 1 Mar 2024 16:15:25 +1000 Subject: [PATCH 13/23] nixos: bumped to HEAD of 23.11 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d848547..a2cd1a2 100644 --- a/flake.lock +++ b/flake.lock @@ -559,11 +559,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1704420045, - "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", + "lastModified": 1709218635, + "narHash": "sha256-nytX/MkfqeTD4z7bMq4QRXcHxO9B3vRo9tM6fMtPFA8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", + "rev": "068d4db604958d05d0b46c47f79b507d84dbc069", "type": "github" }, "original": { From 8408aa1a0f04c5ee6a177df525997ea734c9493a Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Thu, 11 Apr 2024 22:20:34 +1000 Subject: [PATCH 14/23] nixos: bumped to HEAD of 23.11 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a2cd1a2..0ba7233 100644 --- a/flake.lock +++ b/flake.lock @@ -559,11 +559,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1709218635, - "narHash": "sha256-nytX/MkfqeTD4z7bMq4QRXcHxO9B3vRo9tM6fMtPFA8=", + "lastModified": 1712588820, + "narHash": "sha256-y31s5idk3jMJMAVE4Ud9AdI7HT3CgTAeMTJ0StqKN7Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "068d4db604958d05d0b46c47f79b507d84dbc069", + "rev": "d272ca50d1f7424fbfcd1e6f1c9e01d92f6da167", "type": "github" }, "original": { From 3e9cd80565ce5b1dc7e5c11972b7459d63ef0a38 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Wed, 24 Jul 2024 19:27:48 +1000 Subject: [PATCH 15/23] nixos: bumped to the HEAD of 24.05 --- flake.lock | 110 +++++++++++++++++++++++++++++++++++------------------ flake.nix | 2 +- 2 files changed, 74 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index 0ba7233..3ebe8d5 100644 --- a/flake.lock +++ b/flake.lock @@ -117,33 +117,33 @@ "type": "github" } }, - "ghc98X": { + "ghc910X": { "flake": false, "locked": { - "lastModified": 1696643148, - "narHash": "sha256-E02DfgISH7EvvNAu0BHiPvl1E5FGMDi0pWdNZtIBC9I=", - "ref": "ghc-9.8", - "rev": "443e870d977b1ab6fc05f47a9a17bc49296adbd6", - "revCount": 61642, + "lastModified": 1711543129, + "narHash": "sha256-MUI07CxYOng7ZwHnMCw0ugY3HmWo2p/f4r07CGV7OAM=", + "ref": "ghc-9.10", + "rev": "6ecd5f2ff97af53c7334f2d8581651203a2c6b7d", + "revCount": 62607, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" }, "original": { - "ref": "ghc-9.8", + "ref": "ghc-9.10", "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" } }, - "ghc99": { + "ghc911": { "flake": false, "locked": { - "lastModified": 1701580282, - "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", + "lastModified": 1711538967, + "narHash": "sha256-KSdOJ8seP3g30FaC2du8QjU9vumMnmzPR5wfkVRXQMk=", "ref": "refs/heads/master", - "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", - "revCount": 62197, + "rev": "0acfe391583d77a72051d505f05fab0ada056c49", + "revCount": 62632, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -157,11 +157,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1704759826, - "narHash": "sha256-T/HMYRVUqUDy5gzVj5n+UWZKbZlDgkQ/t7eND3yKo4k=", + "lastModified": 1712795058, + "narHash": "sha256-F1PagSlHDeljaHCscOeVw4x7mgxDFgPF9rukr0twCOU=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "1c6cbbcf3ae7152a377f540e9efb67b5452e678a", + "rev": "75f7e75bd6d56d4440fa9357605680ec72d0d125", "type": "github" }, "original": { @@ -179,14 +179,16 @@ "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "ghc98X": "ghc98X", - "ghc99": "ghc99", + "ghc910X": "ghc910X", + "ghc911": "ghc911", "hackage": "hackage", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", "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", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -206,11 +208,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1704761375, - "narHash": "sha256-gd/QRNygBRT5URoWjk+Y0n2vstu8Rt4TNY3BLyV9XQM=", + "lastModified": 1712796616, + "narHash": "sha256-J+Ph+KHlgNLZdttUQg8/Z7vMcWyAdNte07rIEjbqs0A=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "7448cb3337456fbd8208b1c8f1db6b33654e03c0", + "rev": "ad2a252f02e704ded23d465c00e8219e1d4b6841", "type": "github" }, "original": { @@ -304,6 +306,40 @@ "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" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -346,18 +382,18 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1691634696, - "narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=", - "ref": "hkm/remote-iserv", - "rev": "43a979272d9addc29fbffc2e8542c5d96e993d73", - "revCount": 14, - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + "lastModified": 1708894040, + "narHash": "sha256-Rv+PajrnuJ6AeyhtqzMN+bcR8z9+aEnrUass+N951CQ=", + "owner": "stable-haskell", + "repo": "iserv-proxy", + "rev": "2f2a318fd8837f8063a0d91f329aeae29055fba9", + "type": "github" }, "original": { - "ref": "hkm/remote-iserv", - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + "owner": "stable-haskell", + "ref": "iserv-syms", + "repo": "iserv-proxy", + "type": "github" } }, "lowdown-src": { @@ -559,16 +595,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712588820, - "narHash": "sha256-y31s5idk3jMJMAVE4Ud9AdI7HT3CgTAeMTJ0StqKN7Y=", + "lastModified": 1721548954, + "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d272ca50d1f7424fbfcd1e6f1c9e01d92f6da167", + "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -600,11 +636,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1704759004, - "narHash": "sha256-55urxC9WYrCA8enXRI0u328lDu6SdxoCP/U/q15wQdg=", + "lastModified": 1712794249, + "narHash": "sha256-/7K7QStT2VTQlhvSQqMr7GkU+3IQNtMH5MCfbRbDACE=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "8a9a68768d2d3b4e44f0fcf5ed371e2c04f5e475", + "rev": "638d3e6846e1c7c822b5074850abb4e637a6c4ab", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 19654e4..cd13d86 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { haskellNix.url = "github:input-output-hk/haskell.nix"; - nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-23.11; + nixpkgs.url = "github:NixOS/nixpkgs/?ref=nixos-24.05"; utils.url = "github:numtide/flake-utils"; }; From 3497666514b6d35110fb65c999e6b6102e3e11de Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Wed, 24 Jul 2024 19:42:44 +1000 Subject: [PATCH 16/23] nix: add alejandra --- shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.nix b/shell.nix index fdae90f..8a2266a 100644 --- a/shell.nix +++ b/shell.nix @@ -6,6 +6,7 @@ with pkgs; mkShell { buildInputs = [ + alejandra # The Uncompromising Nix Code Formatter nix # Powerful package manager, makes packaging reliable & reproducible stylish-haskell # A simple Haskell code prettifier tea # Gitea official CLI client From a7c888a2d5f784686b42509d17356cdd99b642d5 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 13 Aug 2024 19:23:43 +1000 Subject: [PATCH 17/23] chore(nix): formatted outputs.nix --- outputs.nix | 65 ++++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/outputs.nix b/outputs.nix index faec93c..2726548 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,31 +1,34 @@ -{ self, nixpkgs, utils, haskellNix }@ inputs: - utils.lib.eachDefaultSystem (system: - let - overlay = self: _: { - hsPkgs = - self.haskell-nix.project' rec { - src = ./.; - compiler-nix-name = "ghc928"; - }; - }; - pkgs = import nixpkgs { - inherit system; - overlays = [ - haskellNix.overlay - overlay - ]; - }; - flake = pkgs.hsPkgs.flake { }; - in - { - packages.default = flake.packages."skeleton-web:exe:site"; - apps.default = { - type = "app"; - program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; - }; - # Overwrite devShells being inported from haskell-nix - devShells.default = pkgs.callPackage ./shell.nix { - inherit (haskellNix.legacyPackages."${pkgs.system}") stylish-haskell; - }; - } - ) +{ + self, + nixpkgs, + utils, + haskellNix, +} @ inputs: +utils.lib.eachDefaultSystem ( + system: let + overlay = self: _: { + hsPkgs = self.haskell-nix.project' rec { + src = ./.; + compiler-nix-name = "ghc944"; + }; + }; + pkgs = import nixpkgs { + inherit system; + overlays = [ + haskellNix.overlay + overlay + ]; + }; + flake = pkgs.hsPkgs.flake {}; + in { + packages.default = flake.packages."skeleton-web:exe:site"; + apps.default = { + type = "app"; + program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; + }; + # Overwrite devShells being inported from haskell-nix + devShells.default = pkgs.callPackage ./shell.nix { + inherit (haskellNix.legacyPackages."${pkgs.system}") stylish-haskell; + }; + } +) From 578a6aa77a4761e79fc36b8345d5560c545af9fa Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 13 Aug 2024 19:46:26 +1000 Subject: [PATCH 18/23] chore(nixos): bumped to HEAD of 24.05 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3ebe8d5..cfa27f5 100644 --- a/flake.lock +++ b/flake.lock @@ -595,11 +595,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1721548954, - "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", + "lastModified": 1723400035, + "narHash": "sha256-WoKZDlBEdMhP+hjquBAh0BhUJbcH2+U8g2mHOr1mv8I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", + "rev": "a731b45590a5169542990c36ffcde6cebd9a3356", "type": "github" }, "original": { From aba3616a16b4b6e4937cb6d14cc6b8c3bb93bcb6 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 13 Aug 2024 20:00:55 +1000 Subject: [PATCH 19/23] chore(haskellNix): bumped to HEAD of master --- flake.lock | 154 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 93 insertions(+), 61 deletions(-) diff --git a/flake.lock b/flake.lock index cfa27f5..b1910b9 100644 --- a/flake.lock +++ b/flake.lock @@ -117,51 +117,14 @@ "type": "github" } }, - "ghc910X": { - "flake": false, - "locked": { - "lastModified": 1711543129, - "narHash": "sha256-MUI07CxYOng7ZwHnMCw0ugY3HmWo2p/f4r07CGV7OAM=", - "ref": "ghc-9.10", - "rev": "6ecd5f2ff97af53c7334f2d8581651203a2c6b7d", - "revCount": 62607, - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - }, - "original": { - "ref": "ghc-9.10", - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - } - }, - "ghc911": { - "flake": false, - "locked": { - "lastModified": 1711538967, - "narHash": "sha256-KSdOJ8seP3g30FaC2du8QjU9vumMnmzPR5wfkVRXQMk=", - "ref": "refs/heads/master", - "rev": "0acfe391583d77a72051d505f05fab0ada056c49", - "revCount": 62632, - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://gitlab.haskell.org/ghc/ghc" - } - }, "hackage": { "flake": false, "locked": { - "lastModified": 1712795058, - "narHash": "sha256-F1PagSlHDeljaHCscOeVw4x7mgxDFgPF9rukr0twCOU=", + "lastModified": 1723509065, + "narHash": "sha256-cu7ZQjHFmioemNSSWkRixArTYWbGuO/Ljf9VuMIFwik=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "75f7e75bd6d56d4440fa9357605680ec72d0d125", + "rev": "a14d5468baa4936134b31c064b13eb4fd1403c82", "type": "github" }, "original": { @@ -179,8 +142,6 @@ "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "ghc910X": "ghc910X", - "ghc911": "ghc911", "hackage": "hackage", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", @@ -189,6 +150,9 @@ "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", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -203,16 +167,17 @@ "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", "nixpkgs-2311": "nixpkgs-2311", + "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1712796616, - "narHash": "sha256-J+Ph+KHlgNLZdttUQg8/Z7vMcWyAdNte07rIEjbqs0A=", + "lastModified": 1723510247, + "narHash": "sha256-Nwbq/NAn+Vad4SmoSLHHRxQxxXy/I/6inbMCjQpVvBI=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "ad2a252f02e704ded23d465c00e8219e1d4b6841", + "rev": "374c444d6b78a37b2aa730685a34e0f44ddbd3de", "type": "github" }, "original": { @@ -340,6 +305,57 @@ "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": 1718469202, + "narHash": "sha256-THXSz+iwB1yQQsr/PY151+2GvtoJnTIB2pIQ4OzfjD4=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "40891bccb235ebacce020b598b083eab9dda80f1", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.9.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -382,11 +398,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1708894040, - "narHash": "sha256-Rv+PajrnuJ6AeyhtqzMN+bcR8z9+aEnrUass+N951CQ=", + "lastModified": 1717479972, + "narHash": "sha256-7vE3RQycHI1YT9LHJ1/fUaeln2vIpYm6Mmn8FTpYeVo=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "2f2a318fd8837f8063a0d91f329aeae29055fba9", + "rev": "2ed34002247213fc435d0062350b91bab920626e", "type": "github" }, "original": { @@ -531,11 +547,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1701362232, - "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", + "lastModified": 1705033721, + "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", + "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "type": "github" }, "original": { @@ -547,11 +563,11 @@ }, "nixpkgs-2311": { "locked": { - "lastModified": 1701386440, - "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "lastModified": 1719957072, + "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", "type": "github" }, "original": { @@ -561,6 +577,22 @@ "type": "github" } }, + "nixpkgs-2405": { + "locked": { + "lastModified": 1720122915, + "narHash": "sha256-Nby8WWxj0elBu1xuRaUcRjPi/rU3xVbkAt2kj4QwX2U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "835cf2d3f37989c5db6585a28de967a667a75fb1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -579,17 +611,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1694822471, - "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, @@ -636,11 +668,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1712794249, - "narHash": "sha256-/7K7QStT2VTQlhvSQqMr7GkU+3IQNtMH5MCfbRbDACE=", + "lastModified": 1723508451, + "narHash": "sha256-hK6l7fwCBcQnKjqwpHMicytlCpQh4bCUeiG/qxsABS0=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "638d3e6846e1c7c822b5074850abb4e637a6c4ab", + "rev": "5af3e1baf18c7ea8db99c09cc628d3be11ba7b21", "type": "github" }, "original": { From a01de1ee9eb14b3186a8f7019bc9a1e7ffab8583 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 13 Aug 2024 20:01:49 +1000 Subject: [PATCH 20/23] chore(flakeUtils): bumped to HEAD of master --- flake.lock | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index b1910b9..0027b98 100644 --- a/flake.lock +++ b/flake.lock @@ -681,13 +681,31 @@ "type": "github" } }, - "utils": { + "systems": { "locked": { - "lastModified": 1656928814, - "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { From 683ac23f27b64694acecb80f3ddeb22083e4ee7f Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Fri, 18 Oct 2024 21:16:30 +1000 Subject: [PATCH 21/23] chore(haskell): bump to ghc910 --- outputs.nix | 2 +- shell.nix | 1 + skeleton-web.cabal | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/outputs.nix b/outputs.nix index 2726548..63614f1 100644 --- a/outputs.nix +++ b/outputs.nix @@ -9,7 +9,7 @@ utils.lib.eachDefaultSystem ( overlay = self: _: { hsPkgs = self.haskell-nix.project' rec { src = ./.; - compiler-nix-name = "ghc944"; + compiler-nix-name = "ghc910"; }; }; pkgs = import nixpkgs { diff --git a/shell.nix b/shell.nix index 8a2266a..a9dd876 100644 --- a/shell.nix +++ b/shell.nix @@ -7,6 +7,7 @@ with pkgs; mkShell { buildInputs = [ alejandra # The Uncompromising Nix Code Formatter + haskell.compiler.ghc910 # The Glasgow Haskell Compiler nix # Powerful package manager, makes packaging reliable & reproducible stylish-haskell # A simple Haskell code prettifier tea # Gitea official CLI client diff --git a/skeleton-web.cabal b/skeleton-web.cabal index 729bd24..df5eae9 100644 --- a/skeleton-web.cabal +++ b/skeleton-web.cabal @@ -7,8 +7,6 @@ executable site main-is: site.hs build-depends: base == 4.* , hakyll == 4.16.* - , containers == 0.6.* , filepath == 1.4.* - , pandoc ghc-options: -threaded default-language: Haskell2010 From 834b3ec421039b7824c9473f8d8c6cac01c7cad7 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Mon, 28 Oct 2024 22:03:05 +1000 Subject: [PATCH 22/23] feature(nix): finalise flake --- flake.lock | 21 +++---------- flake.nix | 2 +- outputs.nix | 73 ++++++++++++++++++++++++++++++++++++---------- shell.nix | 1 + skeleton-web.cabal | 2 +- 5 files changed, 64 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index 0027b98..857de2e 100644 --- a/flake.lock +++ b/flake.lock @@ -625,22 +625,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1723400035, - "narHash": "sha256-WoKZDlBEdMhP+hjquBAh0BhUJbcH2+U8g2mHOr1mv8I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a731b45590a5169542990c36ffcde6cebd9a3356", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "old-ghc-nix": { "flake": false, "locked": { @@ -661,7 +645,10 @@ "root": { "inputs": { "haskellNix": "haskellNix", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "haskellNix", + "nixpkgs-unstable" + ], "utils": "utils" } }, diff --git a/flake.nix b/flake.nix index cd13d86..63ee5e9 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { haskellNix.url = "github:input-output-hk/haskell.nix"; - nixpkgs.url = "github:NixOS/nixpkgs/?ref=nixos-24.05"; + nixpkgs.follows = "haskellNix/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; }; diff --git a/outputs.nix b/outputs.nix index 63614f1..7cad915 100644 --- a/outputs.nix +++ b/outputs.nix @@ -6,25 +6,66 @@ } @ inputs: utils.lib.eachDefaultSystem ( system: let - overlay = self: _: { - hsPkgs = self.haskell-nix.project' rec { - src = ./.; - compiler-nix-name = "ghc910"; - }; - }; + overlays = [ + haskellNix.overlay + (final: prev: { + hakyllProject = final.haskell-nix.project' { + src = ./.; + compiler-nix-name = "ghc910"; + shell.buildInputs = [ + skeleton-web + ]; + shell.tools = { + cabal = "latest"; + hlint = "latest"; + haskell-language-server = "latest"; + }; + }; + }) + ]; pkgs = import nixpkgs { - inherit system; - overlays = [ - haskellNix.overlay - overlay - ]; + inherit overlays system; + inherit (haskellNix) config; + }; + flake = pkgs.hakyllProject.flake {}; + skeleton-web = flake.packages."skeleton-web:exe:site"; + hakyll-skeleton = pkgs.stdenv.mkDerivation { + name = "hakyll-skeleton"; + buildInputs = []; + src = + pkgs.nix-gitignore.gitignoreSourcePure [ + ./.gitignore + ".git" + ".github" + ] + ./.; + + # LANG and LOCALE_ARCHIVE are fixes pulled from the community: + LANG = "en_AU.UTF-8"; + LOCALE_ARCHIVE = + pkgs.lib.optionalString + (pkgs.buildPlatform.libc == "glibc") + "${pkgs.glibcLocales}/lib/locale/locale-archive"; + + buildPhase = '' + ${skeleton-web}/bin/site build --verbose + ''; + + installPhase = '' + mkdir -p "$out/dist" + cp -a dist/. "$out/dist" + ''; }; - flake = pkgs.hsPkgs.flake {}; in { - packages.default = flake.packages."skeleton-web:exe:site"; - apps.default = { - type = "app"; - program = "${flake.packages."skeleton-web:exe:site"}/bin/site"; + packages = { + inherit skeleton-web hakyll-skeleton; + default = hakyll-skeleton; + }; + apps = { + default = utils.lib.mkApp { + drv = skeleton-web; + exePath = "/bin/skeleton-web"; + }; }; # Overwrite devShells being inported from haskell-nix devShells.default = pkgs.callPackage ./shell.nix { diff --git a/shell.nix b/shell.nix index a9dd876..df068b6 100644 --- a/shell.nix +++ b/shell.nix @@ -8,6 +8,7 @@ with pkgs; buildInputs = [ alejandra # The Uncompromising Nix Code Formatter haskell.compiler.ghc910 # The Glasgow Haskell Compiler + haskellPackages.hakyll # A static website compiler library nix # Powerful package manager, makes packaging reliable & reproducible stylish-haskell # A simple Haskell code prettifier tea # Gitea official CLI client diff --git a/skeleton-web.cabal b/skeleton-web.cabal index df5eae9..bbeba42 100644 --- a/skeleton-web.cabal +++ b/skeleton-web.cabal @@ -7,6 +7,6 @@ executable site main-is: site.hs build-depends: base == 4.* , hakyll == 4.16.* - , filepath == 1.4.* + , filepath == 1.5.* ghc-options: -threaded default-language: Haskell2010 From ad568a4b104160647b988165f0ea7a82b1f22ef6 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Tue, 29 Oct 2024 00:15:23 +1000 Subject: [PATCH 23/23] chore(hakyll): update haskell --- outputs.nix | 3 +-- site.hs | 22 +++++++++------------- skeleton-web.cabal | 1 + 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/outputs.nix b/outputs.nix index 7cad915..0f285bb 100644 --- a/outputs.nix +++ b/outputs.nix @@ -52,8 +52,7 @@ utils.lib.eachDefaultSystem ( ''; installPhase = '' - mkdir -p "$out/dist" - cp -a dist/. "$out/dist" + cp -a _site/. "$out/" ''; }; in { diff --git a/site.hs b/site.hs index cb2bb83..c08ed25 100644 --- a/site.hs +++ b/site.hs @@ -1,11 +1,11 @@ -------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} -import Data.Monoid (mappend) -import Data.List (sortBy) -import Data.Ord (comparing) +import Control.Monad (forM_, liftM) +import Data.List (sortBy) +import Data.Monoid (mappend) +import Data.Ord (comparing) import Hakyll -import Control.Monad (liftM, forM_) -import System.FilePath (takeBaseName) +import System.FilePath (takeBaseName) -------------------------------------------------------------------------------- main :: IO () @@ -42,10 +42,6 @@ main = hakyll $ do tags <- buildTags "posts/*" (fromCapture "tags/*.html") - match "posts/*" $ version "meta" $ do - route $ setExtension "html" - compile getResourceBody - match "posts/*" $ do route $ setExtension "html" compile $ do @@ -121,8 +117,8 @@ feedConfig = FeedConfiguration { feedTitle = "Skeleton Site" , feedDescription = "you should set this feed description" , feedAuthorName = "set this name" - , feedAuthorEmail = "kolectiva@reciproka.co" - , feedRoot = "https://skeleton.reciproka.co" + , feedAuthorEmail = "kolektivo@reciproka.net" + , feedRoot = "https://skeleton.reciproka.dev" } -------------------------------------------------------------------------------- @@ -131,7 +127,7 @@ siteCtx :: Context String siteCtx = baseCtx `mappend` constField "site_description" "Skeleton Site" `mappend` - constField "site-url" "https://skeleton.reciproka.co" `mappend` + constField "site-url" "https://skeleton.reciproka.dev" `mappend` constField "tagline" "you should set this tag line" `mappend` constField "site-title" "Skeleton Site" `mappend` constField "copy-year" "2024" `mappend` @@ -139,7 +135,7 @@ siteCtx = defaultContext baseCtx = - constField "baseurl" "https://skeleton.reciproka.co" + constField "baseurl" "https://skeleton.reciproka.dev" -------------------------------------------------------------------------------- diff --git a/skeleton-web.cabal b/skeleton-web.cabal index bbeba42..5dba143 100644 --- a/skeleton-web.cabal +++ b/skeleton-web.cabal @@ -8,5 +8,6 @@ executable site build-depends: base == 4.* , hakyll == 4.16.* , filepath == 1.5.* + , pandoc ghc-options: -threaded default-language: Haskell2010