From 688e63ce0421a7624193968edc6d778a389c1ef3 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 5 Aug 2026 08:41:36 -0500 Subject: [PATCH] Update and build script --- .github/workflows/build.yml | 20 ++++++++++++ .github/workflows/pr.yml | 10 ++++++ flake.lock | 62 ++++++++++++------------------------- flake.nix | 25 +++++++++------ 4 files changed, 65 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e6774c0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +"on": + pull_request: + workflow_dispatch: + push: + branches: + - main + tags: + - "*" + +jobs: + build: + runs-on: nix-latest + strategy: + matrix: + arch: + - x86 + - ucrt + steps: + - name: Build + run: nix run -L "${{ matrix.arch }}" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..5990a35 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,10 @@ +"on": + pull_request: + +jobs: + check: + runs-on: nix-latest + steps: + - uses: actions/checkout@v6 + - name: Flake check + run: nix flake check -L diff --git a/flake.lock b/flake.lock index 9af2f89..207bdb8 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,15 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1785627969, + "narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a", "type": "github" }, "original": { @@ -49,39 +49,17 @@ "type": "github" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "hooks": { "inputs": { "flake-compat": "flake-compat", - "gitignore": "gitignore", "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1754416808, - "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", + "lastModified": 1784288435, + "narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", + "rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9", "type": "github" }, "original": { @@ -92,11 +70,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1754340878, - "narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=", + "lastModified": 1782918843, + "narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cab778239e705082fe97bb4990e0d24c50924c04", + "rev": "e8273b29fe1390ec8d4603f2477357555291432e", "type": "github" }, "original": { @@ -108,11 +86,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1753579242, - "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", + "lastModified": 1785031560, + "narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", + "rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c", "type": "github" }, "original": { @@ -123,11 +101,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754393734, - "narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=", + "lastModified": 1785747939, + "narHash": "sha256-D740uKsMbgsfK2oaDenJLLPIZfq7W0/g4KN/Fls8eKs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a683adc19ff5228af548c6539dbc3440509bfed3", + "rev": "104240a772428cc2e20d8fd86c9ddbb886bbaff2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 07a08b8..ce67f80 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,6 @@ flake-parts.url = "github:hercules-ci/flake-parts"; flake-root.url = "github:srid/flake-root"; hooks.url = "github:cachix/git-hooks.nix"; - #aarch_fix.url = "github:greg-hellings/nixpkgs/ucrt/zlib"; }; outputs = @@ -32,9 +31,6 @@ ]; perSystem = { pkgs, self', ... }@inputs': - let - #arm = (import inputs.aarch_fix { inherit (inputs') system; }); - in { _module.args.pkgs = import inputs.nixpkgs { inherit (inputs') system; @@ -67,7 +63,7 @@ end-of-file-fixer.enable = true; fix-byte-order-marker.enable = true; mixed-line-endings.enable = true; - nixfmt-rfc-style.enable = true; + nixfmt.enable = true; trim-trailing-whitespace.enable = true; }; }; @@ -79,16 +75,25 @@ tar = win: let - svnSword = ( - win.sword.overrideAttrs { + svnSword = + (win.sword.overrideAttrs { src = pkgs.fetchsvn { url = "https://svn.crosswire.org/svn/sword/trunk"; rev = "3914"; hash = "sha256-yqZtUb86KILTYcshe/qim5+H57ktKlH3Uiic6KDKnrQ="; }; patches = [ ]; - } - ); + }).override + { + curl = curlMinimal; + }; + curlMinimal = win.curlMinimal.overrideAttrs (final: { + buildInputs = [ ]; + # This causes circular dependencies on bash, which is not supported in MinGW + postInstall = final.postInstall + '' + rm "''${!outputBin}/bin/wcurl" + ''; + }); in pkgs.writeShellApplication { name = "package-sword"; @@ -110,7 +115,7 @@ default = tar mingwW64; x86 = tar mingwW64; ucrt = tar ucrt64; - #ucrtAarch = tar arm.pkgsCross.ucrtAarch64; + #ucrtAarch = tar ucrtAarch64; update = pkgs.callPackage ./update.nix { }; }; };