From af8c8537432a066d345fdf1b6fff6eb6c1e41d6e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 30 Mar 2023 21:47:33 +0000 Subject: [PATCH 01/25] chore(nix): update flake.nix and shell.nix --- flake.lock | 569 +-------------------------------------- flake.nix | 151 ++--------- nix/maildev/node2nix.nix | 2 +- shell.nix | 245 ++++++++++++++--- 4 files changed, 242 insertions(+), 725 deletions(-) diff --git a/flake.lock b/flake.lock index dedb5ba85..b6a59f914 100644 --- a/flake.lock +++ b/flake.lock @@ -1,590 +1,41 @@ { "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" - } - }, - "HaskellNet-SSL": { - "flake": false, - "locked": { - "lastModified": 1582382981, - "narHash": "sha256-fjw+bKaGrGw9uTUd6fWZCIz24uuSTA1VIeijZ+zSq/M=", - "ref": "uni2work", - "rev": "40393c938111ac78232dc2c7eec5edb4a22d03e8", - "revCount": 62, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git" - } - }, - "cabal-32": { - "flake": false, - "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34": { - "flake": false, - "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.4", - "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" - } - }, - "colonnade": { - "flake": false, - "locked": { - "lastModified": 1592144408, - "narHash": "sha256-bQSOjbn56ZEjzqkC/oqZ331FdxF7tbhJndtXeRqWcq8=", - "ref": "uni2work", - "rev": "f8170266ab25b533576e96715bedffc5aa4f19fa", - "revCount": 153, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git" - } - }, - "conduit-resumablesink": { - "flake": false, - "locked": { - "lastModified": 1533667275, - "narHash": "sha256-+TR0tYRk1WFQRrFs6oO80jdlfY7OTyB7th7Hi/tDQMw=", - "ref": "uni2work", - "rev": "cbea6159c2975d42f948525e03e12fc390da53c5", - "revCount": 10, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git" - } - }, - "cryptoids": { - "flake": false, - "locked": { - "lastModified": 1602592869, - "narHash": "sha256-uhbIaVFXtdWmeDJl0ZDyJnE2Ul3bV324KkaK+ix6USA=", - "ref": "uni2work", - "rev": "130b0dcbf2b09ccdf387b50262f1efbbbf1819e3", - "revCount": 44, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git" - } - }, - "cryptonite": { - "flake": false, - "locked": { - "lastModified": 1624444174, - "narHash": "sha256-sDMA4ej1NIModAt7PQvcgIknI3KwfzcAp9YQUSe4CWw=", - "ref": "uni2work", - "rev": "71a630edaf5f22c464e24fac8d9d310f4055ea1f", - "revCount": 1202, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" - } - }, - "docker-nixpkgs": { - "flake": false, - "locked": { - "lastModified": 1631525111, - "narHash": "sha256-dJKw280B1Hp0f6tSkBtkY0nrMT0DR/bmerrS3cQdBjI=", - "owner": "nix-community", - "repo": "docker-nixpkgs", - "rev": "df7f64139a0b2384fb2448dc2a406815f8d03867", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "docker-nixpkgs", - "type": "github" - } - }, - "encoding": { - "flake": false, - "locked": { - "lastModified": 1582400874, - "narHash": "sha256-ukQw4tvjtvqR8HEPgPTSmvtTc6WeXEs3IfCLLNy+YJc=", - "ref": "uni2work", - "rev": "22fc3bb14841d8d50997aa47f1be3852e666f787", - "revCount": 162, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git" - } - }, - "esqueleto": { - "flake": false, - "locked": { - "lastModified": 1648739688, - "narHash": "sha256-rtKhMti9GNq0i7ngTLuNXIyr3zSUTh3G8anXPrKirTk=", - "ref": "uni2work", - "rev": "e18dd125c5ea26fa4e88bed079b61d8c1365ee37", - "revCount": 708, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git" - } - }, "flake-utils": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "type": "github" }, "original": { "owner": "numtide", + "ref": "main", "repo": "flake-utils", "type": "github" } }, - "fontawesome-token": { - "flake": false, - "locked": { - "narHash": "sha256-XABvCxD/7zXRyyR01dr5IvK+8A0VoibiVUS5ZAU+f+o=", - "path": "/etc/fontawesome-token", - "type": "path" - }, - "original": { - "path": "/etc/fontawesome-token", - "type": "path" - } - }, - "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": 1629940355, - "narHash": "sha256-o9/U8R/JtyHIcxhMLaWYP+D/52B6LH/ikCyNZ7+mymI=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "429deb2a137084c011310bad92f4cecf244f2fc2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "haskell-nix": { - "inputs": { - "HTTP": "HTTP", - "cabal-32": "cabal-32", - "cabal-34": "cabal-34", - "cardano-shell": "cardano-shell", - "flake-utils": "flake-utils", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "hackage": "hackage", - "hpc-coveralls": "hpc-coveralls", - "nix-tools": "nix-tools", - "nixpkgs": "nixpkgs", - "nixpkgs-2003": "nixpkgs-2003", - "nixpkgs-2009": "nixpkgs-2009", - "nixpkgs-2105": "nixpkgs-2105", - "nixpkgs-unstable": "nixpkgs-unstable", - "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage" - }, - "locked": { - "lastModified": 1629940530, - "narHash": "sha256-cf/bshYWloj+rJSmOcFokN6Rs1lpFkiECKpykN3JBH8=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "5fcd4faf98fc8ca8287e2c7bc1fff71dfd340f1f", - "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" - } - }, - "ldap-client": { - "flake": false, - "locked": { - "lastModified": 1582401733, - "narHash": "sha256-StLj8BnQqbl8fnE+xWlSOScVRGnl19cv8d1CBZ29O0k=", - "ref": "uni2work", - "rev": "01afaf599ba6f8a9d804c269e91d3190b249d3f0", - "revCount": 61, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git" - } - }, - "memcached-binary": { - "flake": false, - "locked": { - "lastModified": 1582403725, - "narHash": "sha256-40BNhNNYC/B4u16dKwBrkk5hmhncq805YC4y1aGFRqs=", - "ref": "uni2work", - "rev": "b7071df50bad3a251a544b984e4bf98fa09b8fae", - "revCount": 28, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git" - } - }, - "minio-hs": { - "flake": false, - "locked": { - "lastModified": 1597069863, - "narHash": "sha256-JmMajaLT4+zt+w2koDkaloFL8ugmrQBlcYKj+78qn9M=", - "ref": "uni2work", - "rev": "42103ab247057c04c8ce7a83d9d4c160713a3df1", - "revCount": 197, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git" - } - }, - "nix-tools": { - "flake": false, - "locked": { - "lastModified": 1626997434, - "narHash": "sha256-1judQmP298ao6cGUNxcGhcAXHOnA9qSLvWk/ZtoUL7w=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "c8c5e6a6fbb12a73598d1a434984a36e880ce3cf", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1624291665, - "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=", + "lastModified": 1624788075, + "narHash": "sha256-xzO2aL5gGejNvey2jKGnbnFXbo99pdytlY5FF/IhvAE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8", + "rev": "4ba70da807359ed01d662763a96c7b442762e5ef", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-20.09-darwin", + "ref": "master", "repo": "nixpkgs", "type": "github" } }, - "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-2009": { - "locked": { - "lastModified": 1624271064, - "narHash": "sha256-qns/uRW7MR2EfVf6VEeLgCsCp7pIOjDeR44JzTF09MA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "46d1c3f28ca991601a53e9a14fdd53fcd3dd8416", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.09-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105": { - "locked": { - "lastModified": 1624291665, - "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1628785280, - "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "old-ghc-nix": { - "flake": false, - "locked": { - "lastModified": 1621819714, - "narHash": "sha256-EJCnYQSWk7FRLwS0lZgTWIiQ6pcvDX1VuD6LGD4Uwzs=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "f089a6f090cdb35fcf95f865fc6a31ba6b3ac4eb", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master2", - "repo": "old-ghc-nix", - "type": "github" - } - }, "root": { "inputs": { - "HaskellNet-SSL": "HaskellNet-SSL", - "colonnade": "colonnade", - "conduit-resumablesink": "conduit-resumablesink", - "cryptoids": "cryptoids", - "cryptonite": "cryptonite", - "docker-nixpkgs": "docker-nixpkgs", - "encoding": "encoding", - "esqueleto": "esqueleto", - "flake-utils": [ - "haskell-nix", - "flake-utils" - ], - "fontawesome-token": "fontawesome-token", - "haskell-nix": "haskell-nix", - "ldap-client": "ldap-client", - "memcached-binary": "memcached-binary", - "minio-hs": "minio-hs", - "nixpkgs": [ - "haskell-nix", - "nixpkgs-unstable" - ], - "serversession": "serversession", - "xss-sanitize": "xss-sanitize", - "yesod": "yesod", - "zip-stream": "zip-stream" - } - }, - "serversession": { - "flake": false, - "locked": { - "lastModified": 1624794082, - "narHash": "sha256-mixhAsgOq0iiAhOcZfFSyl8CwS7utaKeZBz/Lix16hk=", - "ref": "uni2work", - "rev": "b9d76def10da1260c7f6aa82bda32111f37a952b", - "revCount": 174, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git" - } - }, - "stackage": { - "flake": false, - "locked": { - "lastModified": 1629940472, - "narHash": "sha256-LFrNC25OpNoS6dGG5om+UGP8YdYjp01Qm6cenbemaVg=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "c50dd0527babf85818cc67a7099e532e453752db", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", - "type": "github" - } - }, - "xss-sanitize": { - "flake": false, - "locked": { - "lastModified": 1602593438, - "narHash": "sha256-2jAHm79x8f+ygGHq9gipF3h8+eMT7eCxVMOGMc/brKE=", - "ref": "uni2work", - "rev": "dc928c3a456074b8777603bea20e81937321777f", - "revCount": 114, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git" - } - }, - "yesod": { - "flake": false, - "locked": { - "lastModified": 1625061191, - "narHash": "sha256-K0X2MwUStChml1DlJ7t4yBMDwrMe6j/780nJtSy9Hss=", - "ref": "uni2work", - "rev": "a59f63e0336ee61f7a90b8778e9147305d3127bb", - "revCount": 5053, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git" - } - }, - "zip-stream": { - "flake": false, - "locked": { - "lastModified": 1599734754, - "narHash": "sha256-gqIlgj2dxVkqEMafuVL+dqZPoV+WLpOJwz1NhsKnH64=", - "ref": "uni2work", - "rev": "843683d024f767de236f74d24a3348f69181a720", - "revCount": 39, - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git" - }, - "original": { - "ref": "uni2work", - "type": "git", - "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index e8c0da651..74ee40ff2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,145 +1,36 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Steffen Jost +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen ,Sarah Vaupel # # SPDX-License-Identifier: AGPL-3.0-or-later { - inputs.haskell-nix.url = "github:input-output-hk/haskell.nix"; - inputs.nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; - inputs.flake-utils.follows = "haskell-nix/flake-utils"; - - inputs.docker-nixpkgs = { - url = "github:nix-community/docker-nixpkgs"; - flake = false; + inputs = { + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "master"; + }; + flake-utils = { + type = "github"; + owner = "numtide"; + repo = "flake-utils"; + ref = "main"; + }; }; - inputs.encoding = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work"; - flake = false; - }; - inputs.memcached-binary = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git?ref=uni2work"; - flake = false; - }; - inputs.conduit-resumablesink = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git?ref=uni2work"; - flake = false; - }; - inputs.HaskellNet-SSL = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git?ref=uni2work"; - flake = false; - }; - inputs.ldap-client = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git?ref=uni2work"; - flake = false; - }; - inputs.serversession = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git?ref=uni2work"; - flake = false; - }; - inputs.xss-sanitize = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git?ref=uni2work"; - flake = false; - }; - inputs.colonnade = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git?ref=uni2work"; - flake = false; - }; - inputs.minio-hs = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git?ref=uni2work"; - flake = false; - }; - inputs.cryptoids = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git?ref=uni2work"; - flake = false; - }; - inputs.zip-stream = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git?ref=uni2work"; - flake = false; - }; - inputs.yesod = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git?ref=uni2work"; - flake = false; - }; - inputs.cryptonite = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git?ref=uni2work"; - flake = false; - }; - inputs.esqueleto = { - url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git?ref=uni2work"; - flake = false; - }; - - inputs.fontawesome-token = { - url = "path:/etc/fontawesome-token"; - flake = false; - }; - - outputs = inputs@{ self, nixpkgs, flake-utils, haskell-nix, docker-nixpkgs, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] + outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: - let frontendSource = pkgs.lib.sourceByRegex ./. [ - "^(assets|frontend)(/.*)?$" - "^config(/(favicon\.json|robots\.txt))?$" - "^(webpack|postcss)\.config\.js$" - "^karma\.conf\.js$" - "^(package|jsconfig|\.eslintrc)\.json$" - "^\.babelrc$" - ]; - backendSource = pkgs.lib.sourceByRegex ./. [ - "^(\.hlint|package|stack-flake)\.yaml$" - "^stack\.yaml\.lock$" - "^(assets|app|hlint|load|messages|models|src|templates|test|testdata)(/.*)?$" - "^config(/(archive-types|mimetypes|personalised-sheet-files-collate|settings\.yml|submission-blacklist|test-settings\.yml|video-types|wordlist\.txt))?$" - "^routes$" - "^testdata(/.*)?$" - ]; - - pkgs = import nixpkgs { - inherit system overlays; + let pkgs = import nixpkgs { + inherit system; config.allowUnfree = true; }; - overlays = [ - # remove once https://github.com/NixOS/nix/pull/5266 has landed in nixpkgs used here (see flake.lock) - (import ./nix/aws-patch.nix) - # end remove + overlay = import ./nix/maildev; - (import "${docker-nixpkgs}/overlay.nix") - - (import ./nix/maildev) - haskell-nix.overlay - (import ./nix/uniworx { inherit inputs frontendSource backendSource; }) - (import ./nix/docker { inherit self; }) - (import ./nix/parse-changelog.nix {}) - ]; - haskellFlake = pkgs.uniworx.flake {}; - - mkPushDocker = imageName: dockerImage: pkgs.writeScriptBin "push-${dockerImage.imageName}" '' - #!${pkgs.zsh}/bin/zsh -xe - - target=''${1-docker://registry.gitlab.com/fradrive/fradrive/${imageName}:${dockerImage.imageTag}} - [[ -n "''${1}" ]] && shift - ${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target} - ''; + inherit (pkgs.lib) recursiveUpdate; in { - packages = haskellFlake.packages // { - inherit (pkgs) uniworxNodeDependencies uniworxWellKnown uniworxFrontend uniworxDemoDocker uniworxDocker ciDocker changelogJson; - }; - apps = haskellFlake.apps // { - pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker "uniworx-demo" pkgs.uniworxDemoDocker; }; - pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker "uniworx" pkgs.uniworxDocker; }; - pushCIDocker = flake-utils.lib.mkApp { drv = mkPushDocker "nix-unstable" pkgs.ciDocker; }; - calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; exePath = ""; }; - jqChangelogJson = flake-utils.lib.mkApp { drv = pkgs.jqChangelogJson; }; - }; - checks = haskellFlake.checks // { - uniworxFrontend = pkgs.uniworxFrontend.check; - }; - - devShell = import ./shell.nix { inherit pkgs; }; + devShell = import ./shell.nix { pkgs = self.legacyPackages.${system}; nixpkgsPath = nixpkgs; }; - legacyPackages = pkgs; - - defaultPackage = self.packages.${system}."uniworx:exe:uniworx"; - defaultApp = self.apps.${system}."uniworx:exe:uniworx"; + legacyPackages = recursiveUpdate (overlay self.legacyPackages.${system} pkgs) pkgs; } ); } diff --git a/nix/maildev/node2nix.nix b/nix/maildev/node2nix.nix index 4c5ec372f..0ffc78012 100644 --- a/nix/maildev/node2nix.nix +++ b/nix/maildev/node2nix.nix @@ -6,7 +6,7 @@ {pkgs ? import { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: let nodeEnv = import ./node-env.nix { diff --git a/shell.nix b/shell.nix index d381dcecb..0addd8c96 100644 --- a/shell.nix +++ b/shell.nix @@ -1,27 +1,217 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel ,Steffen Jost +# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel # # SPDX-License-Identifier: AGPL-3.0-or-later -{ pkgs ? (import ./nixpkgs.nix {}).pkgs }: +{ pkgs ? (import ./nixpkgs.nix {}).pkgs, nixpkgsPath ? null }: let inherit (pkgs.lib) optionalString; haskellPackages = pkgs.haskellPackages; - develop = pkgs.writeScriptBin "develop" (import ./nix/develop.nix { inherit pkgs; } '' - if [ -x .develop.cmd ]; then - ./.develop.cmd - else - if [ -n "$ZSH_VERSION" ]; then - autoload -U +X compinit && compinit - autoload -U +X bashcompinit && bashcompinit - fi - eval "$(stack --bash-completion-script stack)" + postgresSchema = pkgs.writeText "schema.sql" '' + CREATE USER uniworx WITH SUPERUSER; + CREATE DATABASE uniworx_test; + GRANT ALL ON DATABASE uniworx_test TO uniworx; + CREATE DATABASE uniworx; + GRANT ALL ON DATABASE uniworx TO uniworx; + ''; - $(getent passwd $USER | cut -d: -f 7) + postgresHba = pkgs.writeText "hba_file" '' + local all all trust + ''; + + develop = pkgs.writeScriptBin "develop" '' + #!${pkgs.zsh}/bin/zsh -e + + basePath=$(pwd) + exec 4<>''${basePath}/.develop.env + + flockRes= + set +e + ${pkgs.util-linux}/bin/flock -en 4; flockRes=$? + set -e + if [[ ''${flockRes} -ne 0 ]]; then + echo "Could not take exclusive lock; is another develop running?" >&2 + exit ''${flockRes} fi - ''); + + cleanup() { + set +e -x + type cleanup_postgres &>/dev/null && cleanup_postgres + type cleanup_widget_memcached &>/dev/null && cleanup_widget_memcached + type cleanup_session_memcached &>/dev/null && cleanup_session_memcached + type cleanup_cache_memcached &>/dev/null && cleanup_cache_memcached + type cleanup_minio &>/dev/null && cleanup_minio + type cleanup_maildev &>/dev/null && cleanup_maildev + + [ -f "''${basePath}/.develop.env" ] && rm -vf "''${basePath}/.develop.env" + set +x + } + + trap cleanup EXIT + + export PORT_OFFSET=$(((16#$(sha256sum <<<"$(hostname -f):''${basePath}" | head -c 16)) % 1000)) + + if [[ -z "$PGHOST" ]]; then + set -xe + + pgDir=$(mktemp -d --tmpdir=''${XDG_RUNTIME_DIR} postgresql.XXXXXX) + pgSockDir=$(mktemp -d --tmpdir=''${XDG_RUNTIME_DIR} postgresql.sock.XXXXXX) + pgLogFile=$(mktemp --tmpdir=''${XDG_RUNTIME_DIR} postgresql.XXXXXX.log) + initdb --no-locale -D ''${pgDir} + pg_ctl start -D ''${pgDir} -l ''${pgLogFile} -w -o "-k ''${pgSockDir} -c listen_addresses=''' -c hba_file='${postgresHba}' -c unix_socket_permissions=0700 -c max_connections=9990 -c shared_preload_libraries=pg_stat_statements -c session_preload_libraries=auto_explain -c auto_explain.log_min_duration=100ms" + psql -h ''${pgSockDir} -f ${postgresSchema} postgres + printf "Postgres logfile is %s\nPostgres socket directory is %s\n" ''${pgLogFile} ''${pgSockDir} + + export PGHOST=''${pgSockDir} + export PGLOG=''${pgLogFile} + + cleanup_postgres() { + set +e -x + pg_ctl stop -D ''${pgDir} + rm -rvf ''${pgDir} ''${pgSockDir} ''${pgLogFile} + set +x + } + + set +xe + fi + + if [[ -z "$WIDGET_MEMCACHED_HOST" ]]; then + set -xe + + memcached -l localhost -p $(($PORT_OFFSET + 11211)) &>/dev/null & + widget_memcached_pid=$! + + export WIDGET_MEMCACHED_HOST=localhost + export WIDGET_MEMCACHED_PORT=$(($PORT_OFFSET + 11211)) + + cleanup_widget_memcached() { + [[ -n "$widget_memcached_pid" ]] && kill $widget_memcached_pid + } + + set +xe + fi + + if [[ -z "$SESSION_MEMCACHED_HOST" ]]; then + set -xe + + memcached -l localhost -p $(($PORT_OFFSET + 11212)) &>/dev/null & + session_memcached_pid=$! + + export SESSION_MEMCACHED_HOST=localhost + export SESSION_MEMCACHED_PORT=$(($PORT_OFFSET + 11212)) + + cleanup_session_memcached() { + [[ -n "$session_memcached_pid" ]] && kill $session_memcached_pid + } + + set +xe + fi + + if [[ -z "$MEMCACHED_HOST" ]]; then + set -xe + + memcached -l localhost -p $(($PORT_OFFSET + 11213)) &>/dev/null & + memcached_pid=$! + + export MEMCACHED_HOST=localhost + export MEMCACHED_PORT=$(($PORT_OFFSET + 11212)) + + cleanup_session_memcached() { + [[ -n "$memcached_pid" ]] && kill $memcached_pid + } + + set +xe + fi + + if [[ -z "$UPLOAD_S3_HOST" ]]; then + set -xe + + cleanup_minio() { + [[ -n "$minio_pid" ]] && kill $minio_pid + [[ -n "''${MINIO_DIR}" ]] && rm -rvf ''${MINIO_DIR} + [[ -n "''${MINIO_LOGFILE}" ]] && rm -rvf ''${MINIO_LOGFILE} + } + + export MINIO_DIR=$(mktemp -d --tmpdir=''${XDG_RUNTIME_DIR} minio.XXXXXX) + export MINIO_LOGFILE=$(mktemp --tmpdir=''${XDG_RUNTIME_DIR} minio.XXXXXX.log) + export MINIO_ACCESS_KEY=$(${pkgs.pwgen}/bin/pwgen -s 16 1) + export MINIO_SECRET_KEY=$(${pkgs.pwgen}/bin/pwgen -s 32 1) + + minio server --address localhost:$(($PORT_OFFSET + 9000)) ''${MINIO_DIR} &>''${MINIO_LOGFILE} & + minio_pid=$! + + export UPLOAD_S3_HOST=localhost + export UPLOAD_S3_PORT=$(($PORT_OFFSET + 9000)) + export UPLOAD_S3_SSL=false + export UPLOAD_S3_KEY_ID=''${MINIO_ACCESS_KEY} + export UPLOAD_S3_KEY=''${MINIO_SECRET_KEY} + + sleep 1 + + set +xe + fi + + ${optionalString (pkgs.nodePackages ? "maildev") '' + if [[ -z "$SMTPHOST" ]]; then + set -xe + + cleanup_maildev() { + [[ -n "$maildev_pid" ]] && kill $maildev_pid + } + + TMPDIR=''${XDG_RUNTIME_DIR} ${pkgs.nodePackages.maildev}/bin/maildev --smtp $(($PORT_OFFSET + 1025)) --web $(($PORT_OFFSET + 8080)) --ip localhost --web-ip localhost &>/dev/null & + maildev_pid=$! + + export SMTPHOST=localhost + export SMTPPORT=$(($PORT_OFFSET + 1025)) + export SMTPSSL=none + + set +xe + fi + ''} + + set -xe + + cat >&4 < Date: Fri, 31 Mar 2023 09:45:20 +0000 Subject: [PATCH 02/25] chore(nix): update shell.nix --- shell.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index 0addd8c96..56038d602 100644 --- a/shell.nix +++ b/shell.nix @@ -263,11 +263,28 @@ let git diff $(cut -d '-' -f 1 <(curl -sH 'Accept: text/plain' https://uni2work.ifi.lmu.de/version)) ''; in pkgs.mkShell { + name = "fradrive"; shellHook = '' ${pkgs.lib.optionalString (nixpkgsPath != null) '' export NIX_PATH=nixpkgs=${nixpkgsPath} ''} ''; - - nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] ++ (with pkgs; [ nodejs-14_x postgresql_12 openldap chromium exiftool memcached minio minio-client gup reuse pre-commit ]) ++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]); + nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] + ++ (with pkgs; + [ nodejs-14_x postgresql_12 openldap chromium exiftool memcached minio minio-client + gup reuse pre-commit + # busybox # for print services, but interferes with build commands in develop-shell + htop + pdftk # pdftk just for testing pdf-passwords + # texlive.combined.scheme-full # works + # texlive.combined.scheme-medium + # texlive.combined.scheme-small + (texlive.combine { + inherit (texlive) scheme-basic + babel-german babel-english booktabs textpos + enumitem eurosym koma-script parskip xcolor dejavu + luatexbase lualatex-math unicode-math selnolig # required for LuaTeX + }) + ] + ) ++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]); } -- 2.39.2 From 28f245dfe44f7f2135da29709d88a0e7c36d2b29 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 12:19:24 +0000 Subject: [PATCH 03/25] chore(release): 27.1.5 --- CHANGELOG.md | 7 +++++++ nix/docker/demo-version.json | 2 +- nix/docker/version.json | 2 +- package-lock.json | 2 +- package.json | 4 ++-- package.yaml | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a114123dc..f8f6e98ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [27.1.5](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.1.4...v27.1.5) (2023-03-31) + + +### Bug Fixes + +* **lms:** lms-direct/deletion-days setting now represent #days to presever lms (used to be #days+1) ([d02e62e](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/d02e62ec20b8cdc9dd6144de558895885ad1e692)) + ## [27.1.4](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.1.3...v27.1.4) (2023-03-28) diff --git a/nix/docker/demo-version.json b/nix/docker/demo-version.json index 5dc5ee56e..ede24371c 100644 --- a/nix/docker/demo-version.json +++ b/nix/docker/demo-version.json @@ -1,3 +1,3 @@ { - "version": "27.1.4" + "version": "27.1.5" } diff --git a/nix/docker/version.json b/nix/docker/version.json index 5dc5ee56e..ede24371c 100644 --- a/nix/docker/version.json +++ b/nix/docker/version.json @@ -1,3 +1,3 @@ { - "version": "27.1.4" + "version": "27.1.5" } diff --git a/package-lock.json b/package-lock.json index d5ea2974b..df4b5b82c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "27.1.4", + "version": "27.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7f0a25f46..96ec74769 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "27.1.4", + "version": "27.1.5", "description": "", "keywords": [], "author": "", @@ -23,7 +23,7 @@ "frontend:build": "webpack --progress", "frontend:build:watch": "webpack --watch --progress", "i18n:test": "./missing-translations.sh", - "prerelease": "./is-clean.sh && npm run test", + "prerelease": "npm run test", "release": "standard-version -a", "postrelease": "git push --follow-tags origin master", "parse-changelog": "changelog-parser ./CHANGELOG.md > changelog.json" diff --git a/package.yaml b/package.yaml index f98b6b573..8d05ca015 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: uniworx -version: 27.1.4 +version: 27.1.5 dependencies: - base - yesod -- 2.39.2 From 1a678d4b9d4cab3ce49abe41bc207b7fc7953345 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 14:31:19 +0000 Subject: [PATCH 04/25] chore(nix): update flake.nix and shell.nix --- flake.lock | 17 +++++++++++++ flake.nix | 74 +++++++++++++++++++++++++++++++++++++++++++++++++----- shell.nix | 3 ++- 3 files changed, 87 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index b6a59f914..3f9923aee 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "docker-nixpkgs": { + "flake": false, + "locked": { + "lastModified": 1678089139, + "narHash": "sha256-cK0RDcxR4eWMrdZIcqNVqnjo9k2LwVmNZO3qj1ctDXU=", + "owner": "nix-community", + "repo": "docker-nixpkgs", + "rev": "2205fb4968adf683324e6d0401b74b9d250d8f56", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "docker-nixpkgs", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1678901627, @@ -34,6 +50,7 @@ }, "root": { "inputs": { + "docker-nixpkgs": "docker-nixpkgs", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 74ee40ff2..089067178 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,21 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -{ +rec { inputs = { + # haskell-nix = { + # url = "github:input-output-hk/haskell.nix"; + # }; nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "master"; }; + docker-nixpkgs = { + url = "github:nix-community/docker-nixpkgs"; + flake = false; + }; flake-utils = { type = "github"; owner = "numtide"; @@ -18,19 +25,74 @@ }; }; - outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem + outputs = { self, nixpkgs, docker-nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: - let pkgs = import nixpkgs { - inherit system; + let frontendSource = pkgs.lib.sourceByRegex ./. [ + "^(assets|frontend)(/.*)?$" + "^config(/(favicon\.json|robots\.txt))?$" + "^(webpack|postcss)\.config\.js$" + "^karma\.conf\.js$" + "^(package|jsconfig|\.eslintrc)\.json$" + "^\.babelrc$" + ]; + + backendSource = pkgs.lib.sourceByRegex ./. [ + "^(\.hlint|package|stack-flake)\.yaml$" + "^stack\.yaml\.lock$" + "^config(/(archive-types|mimetypes|personalised-sheet-files-collate|settings\.yml|submission-blacklist|test-settings\.yml|video-types|wordlist\.txt))?$" + "^routes$" + "^testdata(/.*)?$" + ]; + + pkgs = import nixpkgs { + inherit system overlays; config.allowUnfree = true; }; - overlay = import ./nix/maildev; + + overlays = [ + (import "${docker-nixpkgs}/overlay.nix") + + (import ./nix/maildev) + # haskell-nix.overlay + (import ./nix/uniworx { inherit inputs frontendSource backendSource; }) + (import ./nix/docker { inherit self; }) + (import ./nix/parse-changelog.nix {}) + ]; + + haskellFlake = pkgs.uniworx.flake {}; + + mkPushDocker = imageName: dockerImage: pkgs.writeScriptBin "push-${dockerImage.imageName}" '' + #!${pkgs.zsh}/bin/zsh -xe + + target=''${1-docker://registry.gitlab.com/fradrive/fradrive/${imageName}:${dockerImage.imageTag}} + [[ -n "''${1}" ]] && shift + ${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${dockerImage} ''${target} + ''; inherit (pkgs.lib) recursiveUpdate; in { + packages = haskellFlake.packages // { + inherit (pkgs) uniworxNodeDependencies uniworxWellKnown uniworxFrontend uniworxDemoDocker uniworxDocker ciDocker changelogJson; + }; + + apps = haskellFlake.apps // { + pushUniworxDemoDocker = flake-utils.lib.mkApp { drv = mkPushDocker "uniworx-demo" pkgs.uniworxDemoDocker; }; + pushUniworxDocker = flake-utils.lib.mkApp { drv = mkPushDocker "uniworx" pkgs.uniworxDocker; }; + pushCIDocker = flake-utils.lib.mkApp { drv = mkPushDocker "nix-unstable" pkgs.ciDocker; }; + calculateMaterializedSha = flake-utils.lib.mkApp { drv = pkgs.uniworx.stack-nix.passthru.calculateMaterializedSha; execPath = ""; }; + jqChangelogJson = flake-utils.lib.mkApp { drv = pkgs.jqChangelogJson; }; + }; + + checks = haskellFlake.checks // { + uniworxFrontend = pkgs.uniworxFrontend.check; + }; + devShell = import ./shell.nix { pkgs = self.legacyPackages.${system}; nixpkgsPath = nixpkgs; }; - legacyPackages = recursiveUpdate (overlay self.legacyPackages.${system} pkgs) pkgs; + legacyPackages = pkgs.lib.foldr (overlay: acc: acc // recursiveUpdate (overlay self.legacyPackages.${system} pkgs) pkgs) {} overlays; + + defaultPackage = self.packages.${system}."uniworx:exe:uniworx"; + defaultApp = self.apps.${system}."uniworx:exe:uniworx"; } ); } diff --git a/shell.nix b/shell.nix index 56038d602..c36f0e8fd 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen ,Sarah Vaupel ,Steffen Jost # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -284,6 +284,7 @@ in pkgs.mkShell { babel-german babel-english booktabs textpos enumitem eurosym koma-script parskip xcolor dejavu luatexbase lualatex-math unicode-math selnolig # required for LuaTeX + ; }) ] ) ++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]); -- 2.39.2 From 4cfdb4b8e34ea7e3c4710168ec4aa8bb19e0697d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 15:06:20 +0000 Subject: [PATCH 05/25] chore(release): 27.1.6 --- CHANGELOG.md | 2 ++ nix/docker/demo-version.json | 2 +- nix/docker/version.json | 2 +- package-lock.json | 2 +- package.json | 2 +- package.yaml | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f6e98ad..886ded3c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [27.1.6](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.1.5...v27.1.6) (2023-03-31) + ## [27.1.5](https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/v27.1.4...v27.1.5) (2023-03-31) diff --git a/nix/docker/demo-version.json b/nix/docker/demo-version.json index ede24371c..b2e63f131 100644 --- a/nix/docker/demo-version.json +++ b/nix/docker/demo-version.json @@ -1,3 +1,3 @@ { - "version": "27.1.5" + "version": "27.1.6" } diff --git a/nix/docker/version.json b/nix/docker/version.json index ede24371c..b2e63f131 100644 --- a/nix/docker/version.json +++ b/nix/docker/version.json @@ -1,3 +1,3 @@ { - "version": "27.1.5" + "version": "27.1.6" } diff --git a/package-lock.json b/package-lock.json index df4b5b82c..4e34e05fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "27.1.5", + "version": "27.1.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 96ec74769..4d18a3c80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uni2work", - "version": "27.1.5", + "version": "27.1.6", "description": "", "keywords": [], "author": "", diff --git a/package.yaml b/package.yaml index 8d05ca015..470b39391 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: uniworx -version: 27.1.5 +version: 27.1.6 dependencies: - base - yesod -- 2.39.2 From 6810cdc15fdfe1fba07be633a8ac58b9af4d48c5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 16:19:07 +0000 Subject: [PATCH 06/25] chore(nix): update flake.nix --- flake.lock | 1148 +++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 68 +++- 2 files changed, 1212 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 3f9923aee..a88b407ef 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,246 @@ { "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" + } + }, + "HaskellNet-SSL": { + "flake": false, + "locked": { + "lastModified": 1582382981, + "narHash": "sha256-fjw+bKaGrGw9uTUd6fWZCIz24uuSTA1VIeijZ+zSq/M=", + "ref": "uni2work", + "rev": "40393c938111ac78232dc2c7eec5edb4a22d03e8", + "revCount": 62, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git" + } + }, + "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": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, + "cabal-34": { + "flake": false, + "locked": { + "lastModified": 1645834128, + "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", + "owner": "haskell", + "repo": "cabal", + "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-36": { + "flake": false, + "locked": { + "lastModified": 1669081697, + "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", + "owner": "haskell", + "repo": "cabal", + "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cardano-shell": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "colonnade": { + "flake": false, + "locked": { + "lastModified": 1592144408, + "narHash": "sha256-bQSOjbn56ZEjzqkC/oqZ331FdxF7tbhJndtXeRqWcq8=", + "ref": "uni2work", + "rev": "f8170266ab25b533576e96715bedffc5aa4f19fa", + "revCount": 153, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git" + } + }, + "conduit-resumablesink": { + "flake": false, + "locked": { + "lastModified": 1533667275, + "narHash": "sha256-+TR0tYRk1WFQRrFs6oO80jdlfY7OTyB7th7Hi/tDQMw=", + "ref": "uni2work", + "rev": "cbea6159c2975d42f948525e03e12fc390da53c5", + "revCount": 10, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git" + } + }, + "cryptoids": { + "flake": false, + "locked": { + "lastModified": 1602592869, + "narHash": "sha256-uhbIaVFXtdWmeDJl0ZDyJnE2Ul3bV324KkaK+ix6USA=", + "ref": "uni2work", + "rev": "130b0dcbf2b09ccdf387b50262f1efbbbf1819e3", + "revCount": 44, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git" + } + }, + "cryptonite": { + "flake": false, + "locked": { + "lastModified": 1624444174, + "narHash": "sha256-sDMA4ej1NIModAt7PQvcgIknI3KwfzcAp9YQUSe4CWw=", + "ref": "uni2work", + "rev": "71a630edaf5f22c464e24fac8d9d310f4055ea1f", + "revCount": 1202, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" + } + }, + "devshell": { + "inputs": { + "flake-utils": [ + "haskell-nix", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "haskell-nix", + "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": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ], + "yants": [ + "haskell-nix", + "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" + } + }, "docker-nixpkgs": { "flake": false, "locked": { @@ -16,6 +257,73 @@ "type": "github" } }, + "encoding": { + "flake": false, + "locked": { + "lastModified": 1582400874, + "narHash": "sha256-ukQw4tvjtvqR8HEPgPTSmvtTc6WeXEs3IfCLLNy+YJc=", + "ref": "uni2work", + "rev": "22fc3bb14841d8d50997aa47f1be3852e666f787", + "revCount": 162, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git" + } + }, + "esqueleto": { + "flake": false, + "locked": { + "lastModified": 1648739688, + "narHash": "sha256-rtKhMti9GNq0i7ngTLuNXIyr3zSUTh3G8anXPrKirTk=", + "ref": "uni2work", + "rev": "e18dd125c5ea26fa4e88bed079b61d8c1365ee37", + "revCount": 708, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git" + } + }, + "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": 1678901627, @@ -32,7 +340,607 @@ "type": "github" } }, + "flake-utils_2": { + "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_3": { + "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_4": { + "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": { + "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" + } + }, + "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": 1680222266, + "narHash": "sha256-jPHZPqFOSQATecOOCI4GZyHXofeHrTnno3ciV2mxqxE=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "b07cd4ef4e99bf7711aa9aef06fc6abe79b0126f", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "haskell-nix": { + "inputs": { + "HTTP": "HTTP", + "cabal-32": "cabal-32", + "cabal-34": "cabal-34", + "cabal-36": "cabal-36", + "cardano-shell": "cardano-shell", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_2", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "hackage": "hackage", + "hpc-coveralls": "hpc-coveralls", + "hydra": "hydra", + "iserv-proxy": "iserv-proxy", + "nixpkgs": [ + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003", + "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", + "tullia": "tullia" + }, + "locked": { + "lastModified": 1680223850, + "narHash": "sha256-m6X3rEN33K02Lbt8cjlXZcoLgQGhmY5tb0I01DDvqzE=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "af82dc3e464f58f5cc90400200f703e197d52e84", + "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": [ + "haskell-nix", + "hydra", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1671755331, + "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", + "owner": "NixOS", + "repo": "hydra", + "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", + "type": "github" + }, + "original": { + "id": "hydra", + "type": "indirect" + } + }, + "incl": { + "inputs": { + "nixlib": [ + "haskell-nix", + "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" + } + }, + "ldap-client": { + "flake": false, + "locked": { + "lastModified": 1582401733, + "narHash": "sha256-StLj8BnQqbl8fnE+xWlSOScVRGnl19cv8d1CBZ29O0k=", + "ref": "uni2work", + "rev": "01afaf599ba6f8a9d804c269e91d3190b249d3f0", + "revCount": 61, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git" + } + }, + "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" + } + }, + "memcached-binary": { + "flake": false, + "locked": { + "lastModified": 1582403725, + "narHash": "sha256-40BNhNNYC/B4u16dKwBrkk5hmhncq805YC4y1aGFRqs=", + "ref": "uni2work", + "rev": "b7071df50bad3a251a544b984e4bf98fa09b8fae", + "revCount": 28, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git" + } + }, + "minio-hs": { + "flake": false, + "locked": { + "lastModified": 1597069863, + "narHash": "sha256-JmMajaLT4+zt+w2koDkaloFL8ugmrQBlcYKj+78qn9M=", + "ref": "uni2work", + "rev": "42103ab247057c04c8ce7a83d9d4c160713a3df1", + "revCount": 197, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git" + } + }, + "n2c": { + "inputs": { + "flake-utils": [ + "haskell-nix", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "haskell-nix", + "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", + "nixpkgs": "nixpkgs", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1661606874, + "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", + "owner": "NixOS", + "repo": "nix", + "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "2.11.0", + "repo": "nix", + "type": "github" + } + }, + "nix-nomad": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": [ + "haskell-nix", + "tullia", + "nix2container", + "flake-utils" + ], + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "haskell-nix", + "tullia", + "nixpkgs" + ], + "nixpkgs-lib": [ + "haskell-nix", + "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_3", + "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": [ + "haskell-nix", + "tullia", + "std", + "flake-utils" + ], + "nixago-exts": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "nixpkgs": [ + "haskell-nix", + "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, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "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": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111": { + "locked": { + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2205": { + "locked": { + "lastModified": 1672580127, + "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0874168639713f547c05947c76124f78441ea46c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", + "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, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1675758091, + "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "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": 1624788075, "narHash": "sha256-xzO2aL5gGejNvey2jKGnbnFXbo99pdytlY5FF/IhvAE=", @@ -48,11 +956,249 @@ "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": { + "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": { + "HaskellNet-SSL": "HaskellNet-SSL", + "colonnade": "colonnade", + "conduit-resumablesink": "conduit-resumablesink", + "cryptoids": "cryptoids", + "cryptonite": "cryptonite", "docker-nixpkgs": "docker-nixpkgs", + "encoding": "encoding", + "esqueleto": "esqueleto", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "haskell-nix": "haskell-nix", + "ldap-client": "ldap-client", + "memcached-binary": "memcached-binary", + "minio-hs": "minio-hs", + "nixpkgs": "nixpkgs_5", + "serversession": "serversession", + "xss-sanitize": "xss-sanitize", + "yesod": "yesod", + "zip-stream": "zip-stream" + } + }, + "serversession": { + "flake": false, + "locked": { + "lastModified": 1624794082, + "narHash": "sha256-mixhAsgOq0iiAhOcZfFSyl8CwS7utaKeZBz/Lix16hk=", + "ref": "uni2work", + "rev": "b9d76def10da1260c7f6aa82bda32111f37a952b", + "revCount": 174, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git" + } + }, + "stackage": { + "flake": false, + "locked": { + "lastModified": 1680221394, + "narHash": "sha256-NgDfE4E9ivTtUd8cwS+qwusbbGiqvm/esAg+u6TUXG4=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "d4a0ed4f4d88f4e9eccb99aa71e7ec37c7587aa7", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "std": { + "inputs": { + "arion": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "blank": "blank", + "devshell": "devshell", + "dmerge": "dmerge", + "flake-utils": "flake-utils_4", + "incl": "incl", + "makes": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "microvm": [ + "haskell-nix", + "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": [ + "haskell-nix", + "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" + } + }, + "xss-sanitize": { + "flake": false, + "locked": { + "lastModified": 1602593438, + "narHash": "sha256-2jAHm79x8f+ygGHq9gipF3h8+eMT7eCxVMOGMc/brKE=", + "ref": "uni2work", + "rev": "dc928c3a456074b8777603bea20e81937321777f", + "revCount": 114, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git" + } + }, + "yants": { + "inputs": { + "nixpkgs": [ + "haskell-nix", + "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" + } + }, + "yesod": { + "flake": false, + "locked": { + "lastModified": 1625061191, + "narHash": "sha256-K0X2MwUStChml1DlJ7t4yBMDwrMe6j/780nJtSy9Hss=", + "ref": "uni2work", + "rev": "a59f63e0336ee61f7a90b8778e9147305d3127bb", + "revCount": 5053, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git" + } + }, + "zip-stream": { + "flake": false, + "locked": { + "lastModified": 1599734754, + "narHash": "sha256-gqIlgj2dxVkqEMafuVL+dqZPoV+WLpOJwz1NhsKnH64=", + "ref": "uni2work", + "rev": "843683d024f767de236f74d24a3348f69181a720", + "revCount": 39, + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git" + }, + "original": { + "ref": "uni2work", + "type": "git", + "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git" } } }, diff --git a/flake.nix b/flake.nix index 089067178..3db59a866 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,9 @@ rec { inputs = { - # haskell-nix = { - # url = "github:input-output-hk/haskell.nix"; - # }; + haskell-nix = { + url = "github:input-output-hk/haskell.nix"; + }; nixpkgs = { type = "github"; owner = "NixOS"; @@ -23,6 +23,68 @@ rec { repo = "flake-utils"; ref = "main"; }; + + encoding = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work"; + flake = false; + }; + memcached-binary = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/memcached-binary.git?ref=uni2work"; + flake = false; + }; + conduit-resumablesink = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/conduit-resumablesink.git?ref=uni2work"; + flake = false; + }; + HaskellNet-SSL = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git?ref=uni2work"; + flake = false; + }; + ldap-client = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git?ref=uni2work"; + flake = false; + }; + serversession = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/serversession.git?ref=uni2work"; + flake = false; + }; + xss-sanitize = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git?ref=uni2work"; + flake = false; + }; + colonnade = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/colonnade.git?ref=uni2work"; + flake = false; + }; + minio-hs = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git?ref=uni2work"; + flake = false; + }; + cryptoids = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/cryptoids.git?ref=uni2work"; + flake = false; + }; + zip-stream = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/zip-stream.git?ref=uni2work"; + flake = false; + }; + yesod = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/yesod.git?ref=uni2work"; + flake = false; + }; + cryptonite = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git?ref=uni2work"; + flake = false; + }; + esqueleto = { + url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git?ref=uni2work"; + flake = false; + }; + + # fontawesome-token = { + # url = "path:/etc/fontawesome-token"; + # flake = false; + # }; }; outputs = { self, nixpkgs, docker-nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem -- 2.39.2 From fc73e7d43ca5dfa38f6c1431471da8a3c35eb1d2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 16:37:14 +0000 Subject: [PATCH 07/25] chore(nix): update flake.nix --- flake.lock | 52 +++++++++++++--------------------------------------- flake.nix | 29 +++++++++++++++++------------ 2 files changed, 30 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index a88b407ef..a76f4bc30 100644 --- a/flake.lock +++ b/flake.lock @@ -325,22 +325,6 @@ } }, "flake-utils": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "ref": "main", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "locked": { "lastModified": 1679360468, "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", @@ -356,7 +340,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_2": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -371,7 +355,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_3": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -446,7 +430,7 @@ "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", @@ -713,7 +697,7 @@ }, "nix2container": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -940,22 +924,6 @@ "type": "github" } }, - "nixpkgs_5": { - "locked": { - "lastModified": 1624788075, - "narHash": "sha256-xzO2aL5gGejNvey2jKGnbnFXbo99pdytlY5FF/IhvAE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4ba70da807359ed01d662763a96c7b442762e5ef", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, "nosys": { "locked": { "lastModified": 1667881534, @@ -998,12 +966,18 @@ "docker-nixpkgs": "docker-nixpkgs", "encoding": "encoding", "esqueleto": "esqueleto", - "flake-utils": "flake-utils", + "flake-utils": [ + "haskell-nix", + "flake-utils" + ], "haskell-nix": "haskell-nix", "ldap-client": "ldap-client", "memcached-binary": "memcached-binary", "minio-hs": "minio-hs", - "nixpkgs": "nixpkgs_5", + "nixpkgs": [ + "haskell-nix", + "nixpkgs-unstable" + ], "serversession": "serversession", "xss-sanitize": "xss-sanitize", "yesod": "yesod", @@ -1054,7 +1028,7 @@ "blank": "blank", "devshell": "devshell", "dmerge": "dmerge", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "incl": "incl", "makes": [ "haskell-nix", diff --git a/flake.nix b/flake.nix index 3db59a866..c1c3b00b5 100644 --- a/flake.nix +++ b/flake.nix @@ -7,22 +7,27 @@ rec { haskell-nix = { url = "github:input-output-hk/haskell.nix"; }; - nixpkgs = { - type = "github"; - owner = "NixOS"; - repo = "nixpkgs"; - ref = "master"; - }; + + # nixpkgs = { + # type = "github"; + # owner = "NixOS"; + # repo = "nixpkgs"; + # ref = "master"; + # }; + # flake-utils = { + # type = "github"; + # owner = "numtide"; + # repo = "flake-utils"; + # ref = "main"; + # }; + + nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; + flake-utils.follows = "haskell-nix/flake-utils"; + docker-nixpkgs = { url = "github:nix-community/docker-nixpkgs"; flake = false; }; - flake-utils = { - type = "github"; - owner = "numtide"; - repo = "flake-utils"; - ref = "main"; - }; encoding = { url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/encoding.git?ref=uni2work"; -- 2.39.2 From c13c3122f36a1388fd6fca634cb3c89a1d1075ce Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 21:21:18 +0000 Subject: [PATCH 08/25] chore(nix): update flake.nix --- flake.lock | 52 +++++++++++++++++++++++++++++++++++++++------------- flake.nix | 27 ++++++++++++--------------- 2 files changed, 51 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index a76f4bc30..e7a89f7ca 100644 --- a/flake.lock +++ b/flake.lock @@ -325,6 +325,22 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "main", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1679360468, "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", @@ -340,7 +356,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -355,7 +371,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -430,7 +446,7 @@ "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", "flake-compat": "flake-compat", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", @@ -697,7 +713,7 @@ }, "nix2container": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -924,6 +940,22 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1680296362, + "narHash": "sha256-zI8rKfSoRf261clT5Fi5M+buLyN1z5FgWFgnPHgJd1Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ff40c8086733f2104d416b6ffd4770068a1fd43f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "nosys": { "locked": { "lastModified": 1667881534, @@ -966,18 +998,12 @@ "docker-nixpkgs": "docker-nixpkgs", "encoding": "encoding", "esqueleto": "esqueleto", - "flake-utils": [ - "haskell-nix", - "flake-utils" - ], + "flake-utils": "flake-utils", "haskell-nix": "haskell-nix", "ldap-client": "ldap-client", "memcached-binary": "memcached-binary", "minio-hs": "minio-hs", - "nixpkgs": [ - "haskell-nix", - "nixpkgs-unstable" - ], + "nixpkgs": "nixpkgs_5", "serversession": "serversession", "xss-sanitize": "xss-sanitize", "yesod": "yesod", @@ -1028,7 +1054,7 @@ "blank": "blank", "devshell": "devshell", "dmerge": "dmerge", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "incl": "incl", "makes": [ "haskell-nix", diff --git a/flake.nix b/flake.nix index c1c3b00b5..22409532d 100644 --- a/flake.nix +++ b/flake.nix @@ -8,21 +8,18 @@ rec { url = "github:input-output-hk/haskell.nix"; }; - # nixpkgs = { - # type = "github"; - # owner = "NixOS"; - # repo = "nixpkgs"; - # ref = "master"; - # }; - # flake-utils = { - # type = "github"; - # owner = "numtide"; - # repo = "flake-utils"; - # ref = "main"; - # }; - - nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; - flake-utils.follows = "haskell-nix/flake-utils"; + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "master"; + }; + flake-utils = { + type = "github"; + owner = "numtide"; + repo = "flake-utils"; + ref = "main"; + }; docker-nixpkgs = { url = "github:nix-community/docker-nixpkgs"; -- 2.39.2 From 4b5d3df14177db69101dc0026ee621e6fd2a4964 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 31 Mar 2023 21:26:17 +0000 Subject: [PATCH 09/25] chore(nix): update flake.nix --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 22409532d..ef75fc9ef 100644 --- a/flake.nix +++ b/flake.nix @@ -89,7 +89,7 @@ rec { # }; }; - outputs = { self, nixpkgs, docker-nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem + outputs = { self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachDefaultSystem (system: let frontendSource = pkgs.lib.sourceByRegex ./. [ "^(assets|frontend)(/.*)?$" @@ -117,7 +117,7 @@ rec { (import "${docker-nixpkgs}/overlay.nix") (import ./nix/maildev) - # haskell-nix.overlay + haskell-nix.overlay (import ./nix/uniworx { inherit inputs frontendSource backendSource; }) (import ./nix/docker { inherit self; }) (import ./nix/parse-changelog.nix {}) -- 2.39.2 From e1b2afc755c7342c30f575aa2d388d7d1f6b00b3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 24 Apr 2023 14:07:32 +0000 Subject: [PATCH 10/25] chore(ci): fix --- .mailmap | 5 +- flake.nix | 13 +--- nix/frontend/default.nix | 5 +- nix/frontend/node-env.nix | 117 ++++++++++++++++++++++++++---- nix/frontend/node-packages.nix | 23 +++--- nix/uniworx/node-dependencies.nix | 18 +---- nix/uniworx/well-known.nix | 5 +- package-lock.json | 8 +- package-lock.json.license | 2 +- shell.nix | 3 +- 10 files changed, 137 insertions(+), 62 deletions(-) diff --git a/.mailmap b/.mailmap index dc40904f8..2b49f4244 100644 --- a/.mailmap +++ b/.mailmap @@ -1,5 +1,6 @@ -Gregor Kleen -Gregor Kleen +Gregor Kleen +Gregor Kleen +Gregor Kleen Felix Hamann Steffen Jost Sarah Vaupel diff --git a/flake.nix b/flake.nix index ef75fc9ef..aa8459cf1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen ,Sarah Vaupel +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen , Sarah Vaupel # # SPDX-License-Identifier: AGPL-3.0-or-later -rec { +{ inputs = { haskell-nix = { url = "github:input-output-hk/haskell.nix"; @@ -82,14 +82,9 @@ rec { url = "git+https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git?ref=uni2work"; flake = false; }; - - # fontawesome-token = { - # url = "path:/etc/fontawesome-token"; - # flake = false; - # }; }; - outputs = { self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachDefaultSystem + outputs = inputs@{ self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachDefaultSystem (system: let frontendSource = pkgs.lib.sourceByRegex ./. [ "^(assets|frontend)(/.*)?$" @@ -105,7 +100,7 @@ rec { "^stack\.yaml\.lock$" "^config(/(archive-types|mimetypes|personalised-sheet-files-collate|settings\.yml|submission-blacklist|test-settings\.yml|video-types|wordlist\.txt))?$" "^routes$" - "^testdata(/.*)?$" + "^(assets|app|hlint|load|messages|models|src|templates|test|testdata)(/.*)?$" ]; pkgs = import nixpkgs { diff --git a/nix/frontend/default.nix b/nix/frontend/default.nix index 8acf53226..30650db51 100644 --- a/nix/frontend/default.nix +++ b/nix/frontend/default.nix @@ -1,9 +1,7 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen , Sarah Vaupel # # SPDX-License-Identifier: AGPL-3.0-or-later -# This file has been generated by node2nix 1.11.1. Do not edit! - {pkgs ? import { inherit system; }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: @@ -17,5 +15,6 @@ let in import ./node-packages.nix { inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; + inherit (pkgs.stdenv) fetchurlBoot; inherit nodeEnv; } diff --git a/nix/frontend/node-env.nix b/nix/frontend/node-env.nix index 8126d28d6..bc1e36628 100644 --- a/nix/frontend/node-env.nix +++ b/nix/frontend/node-env.nix @@ -1,7 +1,3 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # This file originates from node2nix {lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}: @@ -169,7 +165,11 @@ let if(process.argv[2] == "development") { replaceDependencies(packageObj.devDependencies); } + else { + packageObj.devDependencies = {}; + } replaceDependencies(packageObj.optionalDependencies); + replaceDependencies(packageObj.peerDependencies); /* Write the fixed package.json file */ fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2)); @@ -274,7 +274,7 @@ let # Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes reconstructPackageLock = writeTextFile { - name = "addintegrityfields.js"; + name = "reconstructpackagelock.js"; text = '' var fs = require('fs'); var path = require('path'); @@ -284,25 +284,43 @@ let var lockObj = { name: packageObj.name, version: packageObj.version, - lockfileVersion: 1, + lockfileVersion: 2, requires: true, + packages: { + "": { + name: packageObj.name, + version: packageObj.version, + license: packageObj.license, + bin: packageObj.bin, + dependencies: packageObj.dependencies, + engines: packageObj.engines, + optionalDependencies: packageObj.optionalDependencies + } + }, dependencies: {} }; - function augmentPackageJSON(filePath, dependencies) { + function augmentPackageJSON(filePath, packages, dependencies) { var packageJSON = path.join(filePath, "package.json"); if(fs.existsSync(packageJSON)) { var packageObj = JSON.parse(fs.readFileSync(packageJSON)); + packages[filePath] = { + version: packageObj.version, + integrity: "sha1-000000000000000000000000000=", + dependencies: packageObj.dependencies, + engines: packageObj.engines, + optionalDependencies: packageObj.optionalDependencies + }; dependencies[packageObj.name] = { version: packageObj.version, integrity: "sha1-000000000000000000000000000=", dependencies: {} }; - processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies); + processDependencies(path.join(filePath, "node_modules"), packages, dependencies[packageObj.name].dependencies); } } - function processDependencies(dir, dependencies) { + function processDependencies(dir, packages, dependencies) { if(fs.existsSync(dir)) { var files = fs.readdirSync(dir); @@ -318,23 +336,84 @@ let pkgFiles.forEach(function(entry) { if(stats.isDirectory()) { var pkgFilePath = path.join(filePath, entry); - augmentPackageJSON(pkgFilePath, dependencies); + augmentPackageJSON(pkgFilePath, packages, dependencies); } }); } else { - augmentPackageJSON(filePath, dependencies); + augmentPackageJSON(filePath, packages, dependencies); } } }); } } - processDependencies("node_modules", lockObj.dependencies); + processDependencies("node_modules", lockObj.packages, lockObj.dependencies); fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2)); ''; }; + # Script that links bins defined in package.json to the node_modules bin directory + # NPM does not do this for top-level packages itself anymore as of v7 + linkBinsScript = writeTextFile { + name = "linkbins.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + var packageObj = JSON.parse(fs.readFileSync("package.json")); + + var nodeModules = Array(packageObj.name.split("/").length).fill("..").join(path.sep); + + if(packageObj.bin !== undefined) { + fs.mkdirSync(path.join(nodeModules, ".bin")) + + if(typeof packageObj.bin == "object") { + Object.keys(packageObj.bin).forEach(function(exe) { + if(fs.existsSync(packageObj.bin[exe])) { + console.log("linking bin '" + exe + "'"); + fs.symlinkSync( + path.join("..", packageObj.name, packageObj.bin[exe]), + path.join(nodeModules, ".bin", exe) + ); + } + else { + console.log("skipping non-existent bin '" + exe + "'"); + } + }) + } + else { + if(fs.existsSync(packageObj.bin)) { + console.log("linking bin '" + packageObj.bin + "'"); + fs.symlinkSync( + path.join("..", packageObj.name, packageObj.bin), + path.join(nodeModules, ".bin", packageObj.name.split("/").pop()) + ); + } + else { + console.log("skipping non-existent bin '" + packageObj.bin + "'"); + } + } + } + else if(packageObj.directories !== undefined && packageObj.directories.bin !== undefined) { + fs.mkdirSync(path.join(nodeModules, ".bin")) + + fs.readdirSync(packageObj.directories.bin).forEach(function(exe) { + if(fs.existsSync(path.join(packageObj.directories.bin, exe))) { + console.log("linking bin '" + exe + "'"); + fs.symlinkSync( + path.join("..", packageObj.name, packageObj.directories.bin, exe), + path.join(nodeModules, ".bin", exe) + ); + } + else { + console.log("skipping non-existent bin '" + exe + "'"); + } + }) + } + ''; + }; + prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}: let forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com"; @@ -381,13 +460,18 @@ let npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild + runHook postRebuild + if [ "''${dontNpmInstall-}" != "1" ] then # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. rm -f npm-shrinkwrap.json - npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install + npm ${forceOfflineFlag} --nodedir=${nodeSources} --no-bin-links --ignore-scripts ${npmFlags} ${lib.optionalString production "--production"} install fi + + # Link executables defined in package.json + node ${linkBinsScript} ''; # Builds and composes an NPM package including all its dependencies @@ -446,12 +530,15 @@ let then ln -s $out/lib/node_modules/.bin $out/bin - # Patch the shebang lines of all the executables + # Fixup all executables ls $out/bin/* | while read i do file="$(readlink -f "$i")" chmod u+rwx "$file" - patchShebangs "$file" + if isScript "$file" + then + sed -i 's/\r$//' "$file" # convert crlf to lf + fi done fi diff --git a/nix/frontend/node-packages.nix b/nix/frontend/node-packages.nix index 3e6a0c925..d985d3771 100644 --- a/nix/frontend/node-packages.nix +++ b/nix/frontend/node-packages.nix @@ -1,10 +1,6 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # This file has been generated by node2nix 1.11.1. Do not edit! -{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: +{nodeEnv, fetchurl, fetchurlBoot, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: let sources = { @@ -1272,9 +1268,9 @@ let name = "_at_fortawesome_slash_fontawesome-pro"; packageName = "@fortawesome/fontawesome-pro"; version = "6.1.1"; - src = fetchurl { + src = fetchurlBoot { url = "https://npm.fontawesome.com/@fortawesome/fontawesome-pro/-/6.1.1/fontawesome-pro-6.1.1.tgz"; - sha512 = "0w6GM8sCXNpcBLUz4bx61JvjjoCvfEIz5wBz2KjLNw9qk1F2XiUWuifXobvLbwaA7kqPGBRPo3U8Zw7zyaJ9sA=="; + hash = "sha256-Pq+n8YWCwwQ9B1Etfqs5sypghBMPWPAJFQ49UAlnS18="; }; }; "@humanwhocodes/config-array-0.9.5" = { @@ -6803,6 +6799,15 @@ let sha512 = "sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q=="; }; }; + "nth-check-1.0.2" = { + name = "nth-check"; + packageName = "nth-check"; + version = "1.0.2"; + src = fetchurl { + url = "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz"; + sha512 = "WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg=="; + }; + }; "nth-check-2.0.1" = { name = "nth-check"; packageName = "nth-check"; @@ -10128,7 +10133,7 @@ let args = { name = "uni2work"; packageName = "uni2work"; - version = "26.1.1"; + version = "27.1.6"; src = ../..; dependencies = [ sources."@ampproject/remapping-2.2.0" @@ -10619,7 +10624,7 @@ let dependencies = [ (sources."css-select-1.2.0" // { dependencies = [ - sources."nth-check-2.0.1" + sources."nth-check-1.0.2" ]; }) sources."css-what-2.1.3" diff --git a/nix/uniworx/node-dependencies.nix b/nix/uniworx/node-dependencies.nix index fa88412aa..34bbd4f17 100644 --- a/nix/uniworx/node-dependencies.nix +++ b/nix/uniworx/node-dependencies.nix @@ -1,19 +1,7 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen # # SPDX-License-Identifier: AGPL-3.0-or-later -{ inputs, ... }: final: prev: { - uniworxNodeDependencies = (prev.callPackage ../frontend {}).nodeDependencies.override (oldArgs: { - dependencies = - let - srcOverrides = { - "tail.datetime" = inputs.tail-DateTime; - "@fortawesome/fontawesome-pro" = prev.fetchurl { - url = "https://npm.fontawesome.com/@fortawesome/fontawesome-pro/-/5.14.0/fontawesome-pro-5.14.0.tgz"; - curlOpts = "-H @${prev.writeText "headers.txt" "Authorization: Bearer ${builtins.readFile inputs.fontawesome-token}"}"; - hash = "sha256-jGvPrTKKL0rCWRZUEnJEmrOdHyQYs3M5709B1hjmFw4="; - }; - }; - in map (dep: dep // { src = srcOverrides."${dep.packageName}" or dep.src; }) oldArgs.dependencies; - }); +{ ... }: final: prev: { + uniworxNodeDependencies = (prev.callPackage ../frontend {}).nodeDependencies; } diff --git a/nix/uniworx/well-known.nix b/nix/uniworx/well-known.nix index adcb6ee3a..d23d3a836 100644 --- a/nix/uniworx/well-known.nix +++ b/nix/uniworx/well-known.nix @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +21,6 @@ ''; outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHash = "18MfdmJX3q826Q4p2F3SnwS2fCjLN0LUpIV/jqUPH4I="; + outputHash = "sha256-zntsIUu13s5doijk3C8ZniYDlDdHZ5Isbv0SQLNgt08="; }; } diff --git a/package-lock.json b/package-lock.json index 4e34e05fa..0a2b70581 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3829,12 +3829,12 @@ }, "dependencies": { "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", "dev": true, "requires": { - "boolbase": "^1.0.0" + "boolbase": "~1.0.0" } } } diff --git a/package-lock.json.license b/package-lock.json.license index f15f3f211..8e5638ee4 100644 --- a/package-lock.json.license +++ b/package-lock.json.license @@ -1,3 +1,3 @@ -SPDX-FileCopyrightText: 2022 Felix Hamann ,Gregor Kleen ,Sarah Vaupel ,Sarah Vaupel ,Steffen Jost +SPDX-FileCopyrightText: 2022-2023 Felix Hamann , Gregor Kleen , Sarah Vaupel , Steffen Jost SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/shell.nix b/shell.nix index c36f0e8fd..fefbd66c3 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen ,Sarah Vaupel ,Steffen Jost +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen , Sarah Vaupel , Steffen Jost # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -273,6 +273,7 @@ in pkgs.mkShell { ++ (with pkgs; [ nodejs-14_x postgresql_12 openldap chromium exiftool memcached minio minio-client gup reuse pre-commit + node2nix # busybox # for print services, but interferes with build commands in develop-shell htop pdftk # pdftk just for testing pdf-passwords -- 2.39.2 From bb441d83e6cc9e9a58a2029fb2c2bfaa7a23bf0c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 24 Apr 2023 14:09:56 +0000 Subject: [PATCH 11/25] chore(ci): auth for fetchurl --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 597def4c5..dd820e3b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,6 +44,7 @@ node dependencies: - install -v -T -m 0644 "${SSH_KNOWN_HOSTS}" ~/.ssh/known_hosts - install -v -T -m 0400 "${SSH_DEPLOY_KEY}" ~/.ssh/deploy && echo "IdentityFile ~/.ssh/deploy" >> ~/.ssh/config; - install -v -T -m 0644 "${FONTAWESOME_NPM_AUTH_FILE}" /etc/fontawesome-token + - install -v -T -m 0644 "${NIX_NETRC}" /etc/nix/netrc - | if [ -n "${REGISTRY_AUTHFILE}" ]; then mkdir -p ~/.docker -- 2.39.2 From d52dc56d906834b26b00cadd403f702535996fee Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 24 Apr 2023 14:44:04 +0000 Subject: [PATCH 12/25] chore(ci): bump nix image --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd820e3b7..3dc4791b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ workflow: default: image: - name: registry.gitlab.com/fradrive/fradrive/nix-unstable:0.1.0 + name: registry.gitlab.com/fradrive/fradrive/nix-unstable:nixos-21.05 variables: NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz" -- 2.39.2 From 9a26e9781c88071e2b8ea3570d39c788cd64a20f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 24 Apr 2023 15:02:21 +0000 Subject: [PATCH 13/25] chore(ci): bump nix image --- .gitlab-ci.yml | 2 +- nix/docker/ci-version.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dc4791b4..c335448c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ workflow: default: image: - name: registry.gitlab.com/fradrive/fradrive/nix-unstable:nixos-21.05 + name: registry.gitlab.com/fradrive/fradrive/nix-unstable:0.2.0 variables: NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz" diff --git a/nix/docker/ci-version.json b/nix/docker/ci-version.json index 6a3252ea8..10e64e00d 100644 --- a/nix/docker/ci-version.json +++ b/nix/docker/ci-version.json @@ -1,3 +1,3 @@ { - "version": "0.1.0" + "version": "0.2.0" } -- 2.39.2 From eae48a58872a9df46ae02a77d04ec355b844213e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 06:28:47 +0000 Subject: [PATCH 14/25] chore(ci): fix check --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index aa8459cf1..b8529dd39 100644 --- a/flake.nix +++ b/flake.nix @@ -84,7 +84,7 @@ }; }; - outputs = inputs@{ self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachDefaultSystem + outputs = inputs@{ self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] (system: let frontendSource = pkgs.lib.sourceByRegex ./. [ "^(assets|frontend)(/.*)?$" -- 2.39.2 From bd29a204fa0b0907e6995daf0dab17966b637866 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 06:35:43 +0000 Subject: [PATCH 15/25] chore(ci): ca-references no longer experimental --- .gitlab-ci/nix-bootstrap.conf | 2 +- .gitlab-ci/nix.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/nix-bootstrap.conf b/.gitlab-ci/nix-bootstrap.conf index 036c2fc5e..ad910db2c 100644 --- a/.gitlab-ci/nix-bootstrap.conf +++ b/.gitlab-ci/nix-bootstrap.conf @@ -1,5 +1,5 @@ sandbox = true -experimental-features = nix-command flakes ca-references +experimental-features = nix-command flakes substituters = https://hydra.iohk.io https://cache.nixos.org/ trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= require-sigs = true \ No newline at end of file diff --git a/.gitlab-ci/nix.conf b/.gitlab-ci/nix.conf index 29c91aba8..476e9d67c 100644 --- a/.gitlab-ci/nix.conf +++ b/.gitlab-ci/nix.conf @@ -1,5 +1,5 @@ sandbox = true -experimental-features = nix-command flakes ca-references +experimental-features = nix-command flakes substituters = https://hydra.iohk.io https://cache.nixos.org/ s3://nix-cache?scheme=http&endpoint=minio-gitlab-runner-cache trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio-gitlab-runner-cache:ZN5neq93MHqpnieHSBlxGgWvCL0WKrZ2S9QS+U5Bnro= require-sigs = true -- 2.39.2 From c86f36b2f67a014352b043397c32b6d8ca1642fe Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 07:13:35 +0000 Subject: [PATCH 16/25] feat(docker): wrap within tini Also cleanup environment within container --- nix/docker/default.nix | 71 +++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/nix/docker/default.nix b/nix/docker/default.nix index d452f8849..ad93c3a23 100644 --- a/nix/docker/default.nix +++ b/nix/docker/default.nix @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Sarah Vaupel ,Steffen Jost ,Steffen Jost +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen , Sarah Vaupel , Steffen Jost # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -13,38 +13,47 @@ let printf '%s' $(date -Is -d '@${toString self.lastModified}') > $out ''); in if self ? lastModified then fromDate else "1970-01-01T00:00:01Z"; - + mkUniworxDocker = { isDemo }: prev.dockerTools.buildImage { name = "uniworx${optionalString isDemo "-demo"}"; tag = let versionFile = if isDemo then ./demo-version.json else ./version.json; in (builtins.fromJSON (prev.lib.readFile versionFile)).version; - inherit created; + inherit created; - contents = with final; [ - uniworx.uniworx.components.exes.uniworx - prev.dockerTools.binSh findutils coreutils - iana-etc - # for PDF creation with Pandoc and LuaTeX - #cups # needed for interface with print center -- did not work as intended, requires lpd running - busybox # should provide a working lpr -- to be tested - htop - pdftk # for encrypting pdfs - #texlive.combined.scheme-medium # too large for container in LMU build environment. - (texlive.combine { - inherit (texlive) scheme-basic - babel-german babel-english booktabs textpos - enumitem eurosym koma-script parskip xcolor dejavu - # required fro LuaTeX - luatexbase lualatex-math unicode-math selnolig - ; - }) - # just for manual testing within the pod, may be removef for production? - curl wget netcat openldap - unixtools.netstat htop gnugrep - locale - ] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ]; + copyToRoot = prev.buildEnv { + name = "uniworx${optionalString isDemo "-demo"}-root"; + paths = with final; [ + uniworx.uniworx.components.exes.uniworx + prev.dockerTools.binSh findutils coreutils + iana-etc + # just for manual testing within the pod, may be removed for production? + curl wget netcat openldap + unixtools.netstat htop gnugrep + locale + ] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ]; + + nativeBuildInputs = with prev; [ makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/uniworx \ + --set-default LOCALE_ARCHIVE ${final.glibcLocalesUtf8}/lib/locale/locale-archive \ + --set-default LOCALE_ARCHIVE_2_27 ${final.glibcLocalesUtf8}/lib/locale/locale-archive \ + --set-default LANG en_DK.UTF-8 \ + --suffix PATH : ${makeBinPath (with final; [ + busybox + pdftk + (texlive.combine { + inherit (texlive) scheme-basic + babel-german babel-english booktabs textpos + enumitem eurosym koma-script parskip xcolor dejavu + # required fro LuaTeX + luatexbase lualatex-math unicode-math selnolig + ; + }) + ])} + ''; + }; runAsRoot = '' #!${final.stdenv.shell} @@ -61,7 +70,7 @@ let install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx # just to see how to create directories here - mkdir -p /testdir + mkdir -p /testdir ${optionalString isDemo '' install -d -g uniworx -o uniworx -m 0750 /var/lib/postgres @@ -134,7 +143,7 @@ let approot: "_env:APPROOT:http://localhost:8080" ''; in { - Cmd = [ "${entrypoint}/bin/uniworx-entrypoint" ]; + Cmd = [ "${final.tini}/bin/tini" "${entrypoint}/bin/uniworx-entrypoint" ]; User = "uniworx:uniworx"; ExposedPorts = { "8080/tcp" = {}; @@ -145,6 +154,10 @@ let } // optionalAttrs isDemo { "/var/lib/postgres" = {}; }; + Env = [ + "TINI_SUBREAPER=yes" + "TINI_VERBOSITY=2" + ]; }; }; in @@ -160,7 +173,7 @@ in minio-client xz ]; - + runAsRoot = '' #!${final.stdenv.shell} -- 2.39.2 From d89d4cfbbcfa4cf23fcc5218eeebfd368be791dc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 07:46:17 +0000 Subject: [PATCH 17/25] chore: fix local build --- flake.lock | 8 ++++---- flake.nix | 5 +++-- nix/uniworx/backend.nix | 7 +++++-- nix/uniworx/default.nix | 6 +++--- shell.nix | 6 ++++-- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index e7a89f7ca..fc47a42ff 100644 --- a/flake.lock +++ b/flake.lock @@ -942,16 +942,16 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1680296362, - "narHash": "sha256-zI8rKfSoRf261clT5Fi5M+buLyN1z5FgWFgnPHgJd1Y=", + "lastModified": 1628953589, + "narHash": "sha256-k9iFFwHvqKFBjCL2tOsJGlpzWRd0UQvsGSTDInCrkRM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ff40c8086733f2104d416b6ffd4770068a1fd43f", + "rev": "283d622397539f196416657da9dc804a4ca89846", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", + "ref": "283d622397539f196416657da9dc804a4ca89846", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index b8529dd39..f5a697b3c 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,8 @@ type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "master"; + # ref = "master"; + ref = "283d622397539f196416657da9dc804a4ca89846"; }; flake-utils = { type = "github"; @@ -113,7 +114,7 @@ (import ./nix/maildev) haskell-nix.overlay - (import ./nix/uniworx { inherit inputs frontendSource backendSource; }) + (import ./nix/uniworx { inherit inputs frontendSource backendSource; gitRevision = if self ? rev then self.rev else null; }) (import ./nix/docker { inherit self; }) (import ./nix/parse-changelog.nix {}) ]; diff --git a/nix/uniworx/backend.nix b/nix/uniworx/backend.nix index f9681a0aa..03fdb8431 100644 --- a/nix/uniworx/backend.nix +++ b/nix/uniworx/backend.nix @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen ,Steffen Jost +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen , Steffen Jost # # SPDX-License-Identifier: AGPL-3.0-or-later -{ inputs, backendSource, ... }: final: prev: +{ inputs, backendSource, gitRevision ? null, ... }: final: prev: with prev.lib; @@ -66,6 +66,9 @@ in { ''; preBuild = '' export TZDIR=${final.tzdata}/share/zoneinfo + ${optionalString (gitRevision != null) '' + export GIT_REVISION=${gitRevision} + ''} ''; components.library.build-tools = with final.pkgs; [ llvm_9 ]; components.exes.uniworx.build-tools = with final.pkgs; [ llvm_9 ]; diff --git a/nix/uniworx/default.nix b/nix/uniworx/default.nix index 6ecf41bc8..e1b31af28 100644 --- a/nix/uniworx/default.nix +++ b/nix/uniworx/default.nix @@ -1,10 +1,10 @@ -# SPDX-FileCopyrightText: 2022 Gregor Kleen +# SPDX-FileCopyrightText: 2022-2023 Gregor Kleen # # SPDX-License-Identifier: AGPL-3.0-or-later -{ inputs, frontendSource, backendSource }: final: prev: prev.lib.composeManyExtensions [ +{ inputs, frontendSource, backendSource, gitRevision ? null }: final: prev: prev.lib.composeManyExtensions [ (import ./node-dependencies.nix { inherit inputs; }) (import ./well-known.nix { inherit frontendSource; }) (import ./frontend.nix { inherit frontendSource; }) - (import ./backend.nix { inherit backendSource inputs; }) + (import ./backend.nix { inherit backendSource inputs gitRevision; }) ] final prev diff --git a/shell.nix b/shell.nix index fefbd66c3..c7e1f9f8d 100644 --- a/shell.nix +++ b/shell.nix @@ -268,12 +268,14 @@ in pkgs.mkShell { ${pkgs.lib.optionalString (nixpkgsPath != null) '' export NIX_PATH=nixpkgs=${nixpkgsPath} ''} + + export CHROME_BIN=${pkgs.chromium}/bin/chromium ''; nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] ++ (with pkgs; - [ nodejs-14_x postgresql_12 openldap chromium exiftool memcached minio minio-client + [ nodejs-14_x postgresql_12 openldap exiftool memcached minio minio-client gup reuse pre-commit - node2nix + # node2nix # busybox # for print services, but interferes with build commands in develop-shell htop pdftk # pdftk just for testing pdf-passwords -- 2.39.2 From b37c2e6aec125952c26156ad599f18496d5cea8e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 07:46:37 +0000 Subject: [PATCH 18/25] feat: make git revision accessable to nix build --- src/Handler/Info.hs | 6 +++--- src/Handler/Info/TH.hs | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index 424418921..55818b6eb 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -1,4 +1,4 @@ --- SPDX-FileCopyrightText: 2022 Felix Hamann ,Gregor Kleen ,Sarah Vaupel ,Sarah Vaupel ,Steffen Jost ,Winnie Ros +-- SPDX-FileCopyrightText: 2022-2023 Felix Hamann , Gregor Kleen , Sarah Vaupel , Steffen Jost , Winnie Ros -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -43,7 +43,7 @@ pickLegalExternalLang = do getVersionR :: Handler TypedContent getVersionR = selectRep $ do provideRep $ - return ($gitDescribe :: Text) + return ($orGitRevisionEnv gitDescribe :: Text) provideRep getInfoR @@ -99,7 +99,7 @@ getInfoR = do knownBugs = $(i18nWidgetFile "knownBugs") implementation = $(i18nWidgetFile "implementation") gitInfo :: Text - gitInfo = $gitDescribe <> " (" <> $gitCommitDate <> ")" + gitInfo = $(orGitRevisionEnv gitDescribeDate) $(widgetFile "versionHistory") diff --git a/src/Handler/Info/TH.hs b/src/Handler/Info/TH.hs index 6984de242..25925c360 100644 --- a/src/Handler/Info/TH.hs +++ b/src/Handler/Info/TH.hs @@ -1,20 +1,24 @@ --- SPDX-FileCopyrightText: 2022 Gregor Kleen +-- SPDX-FileCopyrightText: 2022-2023 Gregor Kleen -- -- SPDX-License-Identifier: AGPL-3.0-or-later module Handler.Info.TH ( glossaryTerms + , orGitRevisionEnv, gitDescribeDate ) where import Import import Language.Haskell.TH +import Language.Haskell.TH.Lib (stringE) import qualified Data.Char as Char import qualified Data.Map.Strict as Map import qualified Data.Text as Text +import Development.GitRev + glossaryTerms :: FilePath -> Q Exp glossaryTerms basename = do @@ -24,3 +28,9 @@ glossaryTerms basename = do where unPathPiece :: Text -> String unPathPiece = repack . mconcat . map (over _head Char.toUpper) . Text.splitOn "-" + +orGitRevisionEnv :: Q Exp -> Q Exp +orGitRevisionEnv cont = maybe cont stringE =<< runIO (lookupEnv "GIT_REVISION") + +gitDescribeDate :: Q Exp +gitDescribeDate = [e|$gitDescribe <> " (" <> $gitCommitDate <> ")"|] -- 2.39.2 From 9cd7f7a252debdc2012c3f4f1680ec1cbc3061a4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 09:27:27 +0000 Subject: [PATCH 19/25] chore: fix build --- flake.lock | 749 +++++------------------------------------ flake.nix | 3 +- src/Handler/Info.hs | 2 +- src/Handler/Info/TH.hs | 3 +- 4 files changed, 87 insertions(+), 670 deletions(-) diff --git a/flake.lock b/flake.lock index fc47a42ff..b5aaa86bd 100644 --- a/flake.lock +++ b/flake.lock @@ -33,29 +33,14 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/HaskellNet-SSL.git" } }, - "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": { "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", "owner": "haskell", "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", "type": "github" }, "original": { @@ -68,11 +53,11 @@ "cabal-34": { "flake": false, "locked": { - "lastModified": 1645834128, - "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", + "lastModified": 1622475795, + "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", "owner": "haskell", "repo": "cabal", - "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", + "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", "type": "github" }, "original": { @@ -82,23 +67,6 @@ "type": "github" } }, - "cabal-36": { - "flake": false, - "locked": { - "lastModified": 1669081697, - "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", - "owner": "haskell", - "repo": "cabal", - "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, "cardano-shell": { "flake": false, "locked": { @@ -183,72 +151,14 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/cryptonite.git" } }, - "devshell": { - "inputs": { - "flake-utils": [ - "haskell-nix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskell-nix", - "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": [ - "haskell-nix", - "tullia", - "std", - "nixpkgs" - ], - "yants": [ - "haskell-nix", - "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" - } - }, "docker-nixpkgs": { "flake": false, "locked": { - "lastModified": 1678089139, - "narHash": "sha256-cK0RDcxR4eWMrdZIcqNVqnjo9k2LwVmNZO3qj1ctDXU=", + "lastModified": 1631525111, + "narHash": "sha256-dJKw280B1Hp0f6tSkBtkY0nrMT0DR/bmerrS3cQdBjI=", "owner": "nix-community", "repo": "docker-nixpkgs", - "rev": "2205fb4968adf683324e6d0401b74b9d250d8f56", + "rev": "df7f64139a0b2384fb2448dc2a406815f8d03867", "type": "github" }, "original": { @@ -291,46 +201,16 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/esqueleto.git" } }, - "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": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -342,42 +222,11 @@ }, "flake-utils_2": { "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_3": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "type": "github" }, "original": { @@ -403,33 +252,14 @@ "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": 1680222266, - "narHash": "sha256-jPHZPqFOSQATecOOCI4GZyHXofeHrTnno3ciV2mxqxE=", + "lastModified": 1629940355, + "narHash": "sha256-o9/U8R/JtyHIcxhMLaWYP+D/52B6LH/ikCyNZ7+mymI=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "b07cd4ef4e99bf7711aa9aef06fc6abe79b0126f", + "rev": "429deb2a137084c011310bad92f4cecf244f2fc2", "type": "github" }, "original": { @@ -443,35 +273,26 @@ "HTTP": "HTTP", "cabal-32": "cabal-32", "cabal-34": "cabal-34", - "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", - "flake-compat": "flake-compat", "flake-utils": "flake-utils_2", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", - "hydra": "hydra", - "iserv-proxy": "iserv-proxy", - "nixpkgs": [ - "haskell-nix", - "nixpkgs-unstable" - ], + "nix-tools": "nix-tools", + "nixpkgs": "nixpkgs", "nixpkgs-2003": "nixpkgs-2003", + "nixpkgs-2009": "nixpkgs-2009", "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", - "tullia": "tullia" + "stackage": "stackage" }, "locked": { - "lastModified": 1680223850, - "narHash": "sha256-m6X3rEN33K02Lbt8cjlXZcoLgQGhmY5tb0I01DDvqzE=", + "lastModified": 1629940530, + "narHash": "sha256-cf/bshYWloj+rJSmOcFokN6Rs1lpFkiECKpykN3JBH8=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "af82dc3e464f58f5cc90400200f703e197d52e84", + "rev": "5fcd4faf98fc8ca8287e2c7bc1fff71dfd340f1f", "type": "github" }, "original": { @@ -496,69 +317,6 @@ "type": "github" } }, - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "haskell-nix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671755331, - "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", - "owner": "NixOS", - "repo": "hydra", - "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "incl": { - "inputs": { - "nixlib": [ - "haskell-nix", - "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" - } - }, "ldap-client": { "flake": false, "locked": { @@ -576,22 +334,6 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/ldap-client.git" } }, - "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" - } - }, "memcached-binary": { "flake": false, "locked": { @@ -626,157 +368,34 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/minio-hs.git" } }, - "n2c": { - "inputs": { - "flake-utils": [ - "haskell-nix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskell-nix", - "tullia", - "std", - "nixpkgs" - ] - }, + "nix-tools": { + "flake": false, "locked": { - "lastModified": 1665039323, - "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", + "lastModified": 1626997434, + "narHash": "sha256-1judQmP298ao6cGUNxcGhcAXHOnA9qSLvWk/ZtoUL7w=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "c8c5e6a6fbb12a73598d1a434984a36e880ce3cf", "type": "github" }, "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1661606874, - "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", - "owner": "NixOS", - "repo": "nix", - "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.11.0", - "repo": "nix", - "type": "github" - } - }, - "nix-nomad": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": [ - "haskell-nix", - "tullia", - "nix2container", - "flake-utils" - ], - "gomod2nix": "gomod2nix", - "nixpkgs": [ - "haskell-nix", - "tullia", - "nixpkgs" - ], - "nixpkgs-lib": [ - "haskell-nix", - "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_3", - "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": [ - "haskell-nix", - "tullia", - "std", - "flake-utils" - ], - "nixago-exts": [ - "haskell-nix", - "tullia", - "std", - "blank" - ], - "nixpkgs": [ - "haskell-nix", - "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", + "owner": "input-output-hk", + "repo": "nix-tools", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1657693803, - "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", + "lastModified": 1624291665, + "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", + "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05-small", + "ref": "nixpkgs-20.09-darwin", "repo": "nixpkgs", "type": "github" } @@ -797,13 +416,29 @@ "type": "github" } }, - "nixpkgs-2105": { + "nixpkgs-2009": { "locked": { - "lastModified": 1659914493, - "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "lastModified": 1624271064, + "narHash": "sha256-qns/uRW7MR2EfVf6VEeLgCsCp7pIOjDeR44JzTF09MA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", + "rev": "46d1c3f28ca991601a53e9a14fdd53fcd3dd8416", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.09-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105": { + "locked": { + "lastModified": 1624291665, + "narHash": "sha256-kNkaoa3dai9WOi7fsPklCCWZ8hRAkXx0ZUhpYKShyUk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8", "type": "github" }, "original": { @@ -813,77 +448,13 @@ "type": "github" } }, - "nixpkgs-2111": { - "locked": { - "lastModified": 1659446231, - "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2205": { - "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.05-darwin", - "repo": "nixpkgs", - "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, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { - "lastModified": 1675758091, - "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", + "lastModified": 1628785280, + "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", + "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", "type": "github" }, "original": { @@ -895,95 +466,33 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1653581809, - "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "lastModified": 1628785280, + "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", "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": 1628953589, - "narHash": "sha256-k9iFFwHvqKFBjCL2tOsJGlpzWRd0UQvsGSTDInCrkRM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "283d622397539f196416657da9dc804a4ca89846", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "283d622397539f196416657da9dc804a4ca89846", - "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": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "lastModified": 1621819714, + "narHash": "sha256-EJCnYQSWk7FRLwS0lZgTWIiQ6pcvDX1VuD6LGD4Uwzs=", "owner": "angerman", "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "rev": "f089a6f090cdb35fcf95f865fc6a31ba6b3ac4eb", "type": "github" }, "original": { "owner": "angerman", - "ref": "master", + "ref": "master2", "repo": "old-ghc-nix", "type": "github" } @@ -1003,7 +512,7 @@ "ldap-client": "ldap-client", "memcached-binary": "memcached-binary", "minio-hs": "minio-hs", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_2", "serversession": "serversession", "xss-sanitize": "xss-sanitize", "yesod": "yesod", @@ -1030,11 +539,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1680221394, - "narHash": "sha256-NgDfE4E9ivTtUd8cwS+qwusbbGiqvm/esAg+u6TUXG4=", + "lastModified": 1629940472, + "narHash": "sha256-LFrNC25OpNoS6dGG5om+UGP8YdYjp01Qm6cenbemaVg=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "d4a0ed4f4d88f4e9eccb99aa71e7ec37c7587aa7", + "rev": "c50dd0527babf85818cc67a7099e532e453752db", "type": "github" }, "original": { @@ -1043,87 +552,18 @@ "type": "github" } }, - "std": { - "inputs": { - "arion": [ - "haskell-nix", - "tullia", - "std", - "blank" - ], - "blank": "blank", - "devshell": "devshell", - "dmerge": "dmerge", - "flake-utils": "flake-utils_4", - "incl": "incl", - "makes": [ - "haskell-nix", - "tullia", - "std", - "blank" - ], - "microvm": [ - "haskell-nix", - "tullia", - "std", - "blank" - ], - "n2c": "n2c", - "nixago": "nixago", - "nixpkgs": "nixpkgs_4", - "nosys": "nosys", - "yants": "yants" - }, + "systems": { "locked": { - "lastModified": 1674526466, - "narHash": "sha256-tMTaS0bqLx6VJ+K+ZT6xqsXNpzvSXJTmogkraBGzymg=", - "owner": "divnix", - "repo": "std", - "rev": "516387e3d8d059b50e742a2ff1909ed3c8f82826", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "divnix", - "repo": "std", - "type": "github" - } - }, - "tullia": { - "inputs": { - "nix-nomad": "nix-nomad", - "nix2container": "nix2container", - "nixpkgs": [ - "haskell-nix", - "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", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, @@ -1144,29 +584,6 @@ "url": "https://gitlab.ifi.lmu.de/uni2work/haskell/xss-sanitize.git" } }, - "yants": { - "inputs": { - "nixpkgs": [ - "haskell-nix", - "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" - } - }, "yesod": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index f5a697b3c..161000fe7 100644 --- a/flake.nix +++ b/flake.nix @@ -12,8 +12,7 @@ type = "github"; owner = "NixOS"; repo = "nixpkgs"; - # ref = "master"; - ref = "283d622397539f196416657da9dc804a4ca89846"; + ref = "6525bbc06a39f26750ad8ee0d40000ddfdc24acb"; }; flake-utils = { type = "github"; diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index 55818b6eb..497fcb6c4 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -43,7 +43,7 @@ pickLegalExternalLang = do getVersionR :: Handler TypedContent getVersionR = selectRep $ do provideRep $ - return ($orGitRevisionEnv gitDescribe :: Text) + return ($(orGitRevisionEnv gitDescribe) :: Text) provideRep getInfoR diff --git a/src/Handler/Info/TH.hs b/src/Handler/Info/TH.hs index 25925c360..ad4cfe28c 100644 --- a/src/Handler/Info/TH.hs +++ b/src/Handler/Info/TH.hs @@ -10,7 +10,6 @@ module Handler.Info.TH import Import import Language.Haskell.TH -import Language.Haskell.TH.Lib (stringE) import qualified Data.Char as Char @@ -19,6 +18,8 @@ import qualified Data.Text as Text import Development.GitRev +import System.Environment (lookupEnv) + glossaryTerms :: FilePath -> Q Exp glossaryTerms basename = do -- 2.39.2 From effddc7bfb3beed997ff342e707b49b88a31c395 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 09:40:40 +0000 Subject: [PATCH 20/25] fix: nix eval --- nix/frontend/node-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/frontend/node-packages.nix b/nix/frontend/node-packages.nix index d985d3771..6c66ff114 100644 --- a/nix/frontend/node-packages.nix +++ b/nix/frontend/node-packages.nix @@ -1270,7 +1270,7 @@ let version = "6.1.1"; src = fetchurlBoot { url = "https://npm.fontawesome.com/@fortawesome/fontawesome-pro/-/6.1.1/fontawesome-pro-6.1.1.tgz"; - hash = "sha256-Pq+n8YWCwwQ9B1Etfqs5sypghBMPWPAJFQ49UAlnS18="; + sha256 = "Pq+n8YWCwwQ9B1Etfqs5sypghBMPWPAJFQ49UAlnS18="; }; }; "@humanwhocodes/config-array-0.9.5" = { -- 2.39.2 From dff9cbab31cfaaed0e784c701455cb96d0778419 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Apr 2023 09:44:27 +0000 Subject: [PATCH 21/25] chore(ci): fix cache url --- .gitlab-ci/nix-bootstrap.conf | 2 +- .gitlab-ci/nix.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/nix-bootstrap.conf b/.gitlab-ci/nix-bootstrap.conf index ad910db2c..161508eed 100644 --- a/.gitlab-ci/nix-bootstrap.conf +++ b/.gitlab-ci/nix-bootstrap.conf @@ -1,5 +1,5 @@ sandbox = true experimental-features = nix-command flakes -substituters = https://hydra.iohk.io https://cache.nixos.org/ +substituters = https://cache.iog.io https://cache.nixos.org/ trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= require-sigs = true \ No newline at end of file diff --git a/.gitlab-ci/nix.conf b/.gitlab-ci/nix.conf index 476e9d67c..545c35920 100644 --- a/.gitlab-ci/nix.conf +++ b/.gitlab-ci/nix.conf @@ -1,6 +1,6 @@ sandbox = true experimental-features = nix-command flakes -substituters = https://hydra.iohk.io https://cache.nixos.org/ s3://nix-cache?scheme=http&endpoint=minio-gitlab-runner-cache +substituters = https://cache.iog.io https://cache.nixos.org/ s3://nix-cache?scheme=http&endpoint=minio-gitlab-runner-cache trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio-gitlab-runner-cache:ZN5neq93MHqpnieHSBlxGgWvCL0WKrZ2S9QS+U5Bnro= require-sigs = true post-build-hook = /etc/nix/upload-to-cache.sh \ No newline at end of file -- 2.39.2 From dcbfe11cf31d7395799059923f554f64791cecbd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 28 Apr 2023 18:03:46 +0000 Subject: [PATCH 22/25] chore: backport modern conveniences --- flake.lock | 25 +++++++++++++++++++++---- flake.nix | 15 +++++++++++++-- nix/frontend/default.nix | 3 +-- nix/frontend/node-packages.nix | 2 +- shell.nix | 6 +++--- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index b5aaa86bd..e7db699df 100644 --- a/flake.lock +++ b/flake.lock @@ -448,6 +448,22 @@ "type": "github" } }, + "nixpkgs-recent": { + "locked": { + "lastModified": 1669833724, + "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "22.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1628785280, @@ -466,16 +482,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1628785280, - "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", + "lastModified": 1622516815, + "narHash": "sha256-ZjBd81a6J3TwtlBr3rHsZspYUwT9OdhDk+a/SgSEf7I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", + "rev": "7e9b0dff974c89e070da1ad85713ff3c20b0ca97", "type": "github" }, "original": { "owner": "NixOS", - "ref": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", + "ref": "21.05", "repo": "nixpkgs", "type": "github" } @@ -513,6 +529,7 @@ "memcached-binary": "memcached-binary", "minio-hs": "minio-hs", "nixpkgs": "nixpkgs_2", + "nixpkgs-recent": "nixpkgs-recent", "serversession": "serversession", "xss-sanitize": "xss-sanitize", "yesod": "yesod", diff --git a/flake.nix b/flake.nix index 161000fe7..7ac27f64c 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,14 @@ type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "6525bbc06a39f26750ad8ee0d40000ddfdc24acb"; + # ref = "6525bbc06a39f26750ad8ee0d40000ddfdc24acb"; + ref = "21.05"; + }; + nixpkgs-recent = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "22.11"; }; flake-utils = { type = "github"; @@ -84,7 +91,7 @@ }; }; - outputs = inputs@{ self, nixpkgs, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] + outputs = inputs@{ self, nixpkgs, nixpkgs-recent, docker-nixpkgs, flake-utils, haskell-nix, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] (system: let frontendSource = pkgs.lib.sourceByRegex ./. [ "^(assets|frontend)(/.*)?$" @@ -111,6 +118,10 @@ overlays = [ (import "${docker-nixpkgs}/overlay.nix") + (final: prev: let + pkgs-recent = import nixpkgs-recent { inherit system; }; + in { inherit (pkgs-recent) dockerTools node2nix stack; inherit (pkgs-recent.stdenv) fetchurlBoot; }) + (import ./nix/maildev) haskell-nix.overlay (import ./nix/uniworx { inherit inputs frontendSource backendSource; gitRevision = if self ? rev then self.rev else null; }) diff --git a/nix/frontend/default.nix b/nix/frontend/default.nix index 30650db51..fa4b2bf86 100644 --- a/nix/frontend/default.nix +++ b/nix/frontend/default.nix @@ -14,7 +14,6 @@ let }; in import ./node-packages.nix { - inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; - inherit (pkgs.stdenv) fetchurlBoot; + inherit (pkgs) fetchurl fetchurlBoot nix-gitignore stdenv lib fetchgit; inherit nodeEnv; } diff --git a/nix/frontend/node-packages.nix b/nix/frontend/node-packages.nix index 6c66ff114..d985d3771 100644 --- a/nix/frontend/node-packages.nix +++ b/nix/frontend/node-packages.nix @@ -1270,7 +1270,7 @@ let version = "6.1.1"; src = fetchurlBoot { url = "https://npm.fontawesome.com/@fortawesome/fontawesome-pro/-/6.1.1/fontawesome-pro-6.1.1.tgz"; - sha256 = "Pq+n8YWCwwQ9B1Etfqs5sypghBMPWPAJFQ49UAlnS18="; + hash = "sha256-Pq+n8YWCwwQ9B1Etfqs5sypghBMPWPAJFQ49UAlnS18="; }; }; "@humanwhocodes/config-array-0.9.5" = { diff --git a/shell.nix b/shell.nix index c7e1f9f8d..9d891d877 100644 --- a/shell.nix +++ b/shell.nix @@ -273,9 +273,9 @@ in pkgs.mkShell { ''; nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] ++ (with pkgs; - [ nodejs-14_x postgresql_12 openldap exiftool memcached minio minio-client + [ stack nodejs-14_x postgresql_12 openldap exiftool memcached minio minio-client gup reuse pre-commit - # node2nix + node2nix # busybox # for print services, but interferes with build commands in develop-shell htop pdftk # pdftk just for testing pdf-passwords @@ -290,5 +290,5 @@ in pkgs.mkShell { ; }) ] - ) ++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]); + ) ++ (with pkgs.haskellPackages; [ yesod-bin hlint cabal-install weeder profiteur ]); } -- 2.39.2 From bedb47e9d47e98621efb56db0cc24615cb7a8de4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 29 Apr 2023 07:34:54 +0000 Subject: [PATCH 23/25] fix: use recent locales & tzdata --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7ac27f64c..160631eed 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,7 @@ (final: prev: let pkgs-recent = import nixpkgs-recent { inherit system; }; - in { inherit (pkgs-recent) dockerTools node2nix stack; inherit (pkgs-recent.stdenv) fetchurlBoot; }) + in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata; inherit (pkgs-recent.stdenv) fetchurlBoot; }) (import ./nix/maildev) haskell-nix.overlay -- 2.39.2 From 6f47f21fe62851626fe23bd4a32fa579115a27b5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 29 Apr 2023 08:47:44 +0000 Subject: [PATCH 24/25] chore: use some more modern build inputs --- flake.lock | 6 +++--- flake.nix | 2 +- nix/docker/default.nix | 13 ++++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index e7db699df..ffa6b2777 100644 --- a/flake.lock +++ b/flake.lock @@ -154,11 +154,11 @@ "docker-nixpkgs": { "flake": false, "locked": { - "lastModified": 1631525111, - "narHash": "sha256-dJKw280B1Hp0f6tSkBtkY0nrMT0DR/bmerrS3cQdBjI=", + "lastModified": 1678089139, + "narHash": "sha256-cK0RDcxR4eWMrdZIcqNVqnjo9k2LwVmNZO3qj1ctDXU=", "owner": "nix-community", "repo": "docker-nixpkgs", - "rev": "df7f64139a0b2384fb2448dc2a406815f8d03867", + "rev": "2205fb4968adf683324e6d0401b74b9d250d8f56", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 160631eed..c9b610c43 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,7 @@ (final: prev: let pkgs-recent = import nixpkgs-recent { inherit system; }; - in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata; inherit (pkgs-recent.stdenv) fetchurlBoot; }) + in { inherit (pkgs-recent) dockerTools node2nix stack glibcLocalesUtf8 tzdata chromium minio minio-client; inherit (pkgs-recent.stdenv) fetchurlBoot; }) (import ./nix/maildev) haskell-nix.overlay diff --git a/nix/docker/default.nix b/nix/docker/default.nix index ad93c3a23..139ab2f7d 100644 --- a/nix/docker/default.nix +++ b/nix/docker/default.nix @@ -168,11 +168,14 @@ in tag = (builtins.fromJSON (prev.lib.readFile ./ci-version.json)).version; fromImage = prev.docker-nixpkgs.nix-unstable; - contents = with final; [ - bash coreutils - minio-client - xz - ]; + copyToRoot = prev.buildEnv { + name = "uniworx-ci-root"; + paths = with final; [ + bash coreutils + minio-client + xz + ]; + }; runAsRoot = '' #!${final.stdenv.shell} -- 2.39.2 From ff7d1845c5b8f96f8a3c480c0f04f183869611b0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 5 May 2023 12:41:35 +0000 Subject: [PATCH 25/25] chore(package.json): use correct license value --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19678e499..21c9f2519 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "keywords": [], "author": "", - "license": "ISC", + "license": "AGPL-3.0-or-later", "scripts": { "start": "npm-run-all frontend:build --parallel \"frontend:build:watch\" \"yesod:start\"", "test": "run-s frontend:test yesod:test i18n:test", -- 2.39.2