From 76983f80eb6098d36d9b412408acc500a177ab55 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Fri, 27 Sep 2024 11:56:03 +0100 Subject: [PATCH 1/2] fix flakes / npm deps hash --- flake.lock | 79 +++++++++--------------------------------------------- flake.nix | 19 ++++--------- 2 files changed, 18 insertions(+), 80 deletions(-) diff --git a/flake.lock b/flake.lock index d591fde..b419c1e 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -18,65 +18,13 @@ "type": "github" } }, - "melange-compiler-libs": { - "inputs": { - "flake-utils": [ - "melange-src", - "flake-utils" - ], - "nixpkgs": [ - "melange-src", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1705466801, - "narHash": "sha256-1dub8rJZkAjZiKR0EopdXVP3JCbSq/8fAw2Fei0Hh+E=", - "owner": "melange-re", - "repo": "melange-compiler-libs", - "rev": "87bb98024b1669766f9c8aec3bbbf73ef332dcb6", - "type": "github" - }, - "original": { - "owner": "melange-re", - "repo": "melange-compiler-libs", - "type": "github" - } - }, - "melange-src": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "melange-compiler-libs": "melange-compiler-libs", - "nix-filter": [ - "nix-filter" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1706823522, - "narHash": "sha256-LsqXADoVR4T8V1xH2z6rwz/DPJ1epI5u1/eRElwNHKg=", - "owner": "melange-re", - "repo": "melange", - "rev": "09aa67bdc69e92610b25cef7386965deb21df00b", - "type": "github" - }, - "original": { - "owner": "melange-re", - "repo": "melange", - "type": "github" - } - }, "nix-filter": { "locked": { - "lastModified": 1705332318, - "narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=", + "lastModified": 1710156097, + "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "owner": "numtide", "repo": "nix-filter", - "rev": "3449dc925982ad46246cfc36469baf66e1b64f17", + "rev": "3342559a24e85fc164b295c3444e8a139924675b", "type": "github" }, "original": { @@ -93,11 +41,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1706823728, - "narHash": "sha256-xvW0ernpGeJZgLcvln+xwPZ+OYzda0U+JqSqJwDjCgw=", + "lastModified": 1727433901, + "narHash": "sha256-ZF8jDOu3Q+n78h/57gAtMf++X/Kv4b1rioY8uD/3GSw=", "owner": "nix-ocaml", "repo": "nix-overlays", - "rev": "31d09298120b184279e03a8849e7dcd1adffc42b", + "rev": "b35be5d803b249d8ed804d13582e39524f05df5b", "type": "github" }, "original": { @@ -108,24 +56,23 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1706768163, - "narHash": "sha256-mSQ/t2+AriQCxsHHDJ/2uJGMnUzjZLKFVYImln05JPs=", + "lastModified": 1727420604, + "narHash": "sha256-9El1mpPlV1orzCoD59pNAB0u/mLHesZ6Ngl44HzAQDI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32cf02a2607143d94c565c068b73fe45fd57c3a0", + "rev": "1e15add1c28614820fcd4b75e8a5001f1e0b290f", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "32cf02a2607143d94c565c068b73fe45fd57c3a0", + "rev": "1e15add1c28614820fcd4b75e8a5001f1e0b290f", "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", - "melange-src": "melange-src", "nix-filter": "nix-filter", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 61e1559..40b8a79 100644 --- a/flake.nix +++ b/flake.nix @@ -7,22 +7,13 @@ url = "github:nix-ocaml/nix-overlays"; inputs.flake-utils.follows = "flake-utils"; }; - inputs.melange-src = { - url = "github:melange-re/melange"; - inputs.nix-filter.follows = "nix-filter"; - inputs.flake-utils.follows = "flake-utils"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - outputs = { self, nixpkgs, flake-utils, nix-filter, melange-src }: + outputs = { self, nixpkgs, flake-utils, nix-filter }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages."${system}".appendOverlays [ - (self: super: { - ocamlPackages = super.ocaml-ng.ocamlPackages_5_1; - }) - melange-src.overlays.default - ]; + pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: { + ocamlPackages = super.ocaml-ng.ocamlPackages_5_2; + }); inherit (pkgs) nodejs_latest lib stdenv darwin yarn cacert; checkPhaseNodePackages = pkgs.buildNpmPackage { @@ -31,7 +22,7 @@ src = ./.; dontNpmBuild = true; - npmDepsHash = "sha256-ssHwcub4A3tHvpQ929o9qImgHjmHNEsP6waQIrT1jUE="; + npmDepsHash = "sha256-T0oSCDJtwK0vNwoQQBgRtgcrz/1/gfIEUaz2uHgVKKY="; installPhase = '' runHook preInstall mkdir -p "$out" From fad1de7fad0d46ee689ef3d8ee17099a326d5262 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Fri, 27 Sep 2024 11:57:20 +0100 Subject: [PATCH 2/2] wip --- .github/workflows/nix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 027cd64..8839cd4 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ocamlVersion: [5_1] + ocamlVersion: [5_2] steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v21 + - uses: cachix/install-nix-action@v29 with: extra_nix_config: | extra-substituters = https://anmonteiro.nix-cache.workers.dev