Compare commits

...
2 Commits
Author SHA1 Message Date
Greg Hellings 688e63ce04 Update and build script
build.yml / build (x86) (push) Failing after 13s
build.yml / build (ucrt) (push) Failing after 3m44s
2026-08-05 08:41:36 -05:00
Greg Hellings 52a5ec3954 Simplify back to baseline 2026-08-05 08:08:39 -05:00
5 changed files with 114 additions and 69 deletions
+20
View File
@@ -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 }}"
+10
View File
@@ -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
+49
View File
@@ -0,0 +1,49 @@
on:
schedule:
- cron: "7 23 * * *"
workflow_dispatch:
jobs:
update:
runs-on: nix-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Update flake.lock
run: nix flake update
- name: Create PR if changed
env:
GITEA_TOKEN: ${{ secrets.KLAATU_TOKEN }}
GITEA_URL: https://src.thehellings.com
REPO: greg/mingw-sword-build
run: |
if git diff --quiet flake.lock; then
echo "flake.lock unchanged, nothing to do"
exit 0
fi
BRANCH="auto/update-flake-lock-$(date +%Y%m%d)"
git config user.email "klaatu@thehellings.com"
git config user.name "klaatu"
git checkout -b "$BRANCH"
git add flake.lock
git commit -m "chore: update flake.lock $(date +%Y-%m-%d)"
# Push branch using token auth
git remote set-url origin "https://klaatu:${GITEA_TOKEN}@${GITEA_URL#https://}/${REPO}.git"
git push origin "$BRANCH"
# Create PR via Gitea API
curl -s -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${REPO}/pulls" \
-d "{
\"title\": \"chore: update flake.lock $(date +%Y-%m-%d)\",
\"head\": \"$BRANCH\",
\"base\": \"main\",
\"body\": \"Automated weekly flake.lock update.\\n\\nGenerated by Gitea Actions.\",
\"assignees\": [\"greg\"]
}"
Generated
+20 -59
View File
@@ -1,33 +1,17 @@
{ {
"nodes": { "nodes": {
"aarch_fix": {
"locked": {
"lastModified": 1753636920,
"narHash": "sha256-BZq0xc6+3OVxUE+re+Rd+5+JqmGUARxa0M1waMkscyk=",
"owner": "greg-hellings",
"repo": "nixpkgs",
"rev": "54692b15811727c1cd367dbd82e6e22abd1bd057",
"type": "github"
},
"original": {
"owner": "greg-hellings",
"ref": "ucrt/zlib",
"repo": "nixpkgs",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1747046372, "lastModified": 1767039857,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra", "owner": "NixOS",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "edolstra", "owner": "NixOS",
"repo": "flake-compat", "repo": "flake-compat",
"type": "github" "type": "github"
} }
@@ -37,11 +21,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1754487366, "lastModified": 1785627969,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -65,39 +49,17 @@
"type": "github" "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": { "hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1754416808, "lastModified": 1784288435,
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", "narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", "rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -108,11 +70,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1754340878, "lastModified": 1782918843,
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=", "narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cab778239e705082fe97bb4990e0d24c50924c04", "rev": "e8273b29fe1390ec8d4603f2477357555291432e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,11 +86,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1753579242, "lastModified": 1785031560,
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", "narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", "rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -139,11 +101,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1754393734, "lastModified": 1785747939,
"narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=", "narHash": "sha256-D740uKsMbgsfK2oaDenJLLPIZfq7W0/g4KN/Fls8eKs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a683adc19ff5228af548c6539dbc3440509bfed3", "rev": "104240a772428cc2e20d8fd86c9ddbb886bbaff2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -155,7 +117,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"aarch_fix": "aarch_fix",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root", "flake-root": "flake-root",
"hooks": "hooks", "hooks": "hooks",
+15 -10
View File
@@ -14,7 +14,6 @@
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root"; flake-root.url = "github:srid/flake-root";
hooks.url = "github:cachix/git-hooks.nix"; hooks.url = "github:cachix/git-hooks.nix";
aarch_fix.url = "github:greg-hellings/nixpkgs/ucrt/zlib";
}; };
outputs = outputs =
@@ -32,9 +31,6 @@
]; ];
perSystem = perSystem =
{ pkgs, self', ... }@inputs': { pkgs, self', ... }@inputs':
let
arm = (import inputs.aarch_fix { inherit (inputs') system; });
in
{ {
_module.args.pkgs = import inputs.nixpkgs { _module.args.pkgs = import inputs.nixpkgs {
inherit (inputs') system; inherit (inputs') system;
@@ -67,7 +63,7 @@
end-of-file-fixer.enable = true; end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true; fix-byte-order-marker.enable = true;
mixed-line-endings.enable = true; mixed-line-endings.enable = true;
nixfmt-rfc-style.enable = true; nixfmt.enable = true;
trim-trailing-whitespace.enable = true; trim-trailing-whitespace.enable = true;
}; };
}; };
@@ -79,16 +75,25 @@
tar = tar =
win: win:
let let
svnSword = ( svnSword =
win.sword.overrideAttrs { (win.sword.overrideAttrs {
src = pkgs.fetchsvn { src = pkgs.fetchsvn {
url = "https://svn.crosswire.org/svn/sword/trunk"; url = "https://svn.crosswire.org/svn/sword/trunk";
rev = "3914"; rev = "3914";
hash = "sha256-yqZtUb86KILTYcshe/qim5+H57ktKlH3Uiic6KDKnrQ="; hash = "sha256-yqZtUb86KILTYcshe/qim5+H57ktKlH3Uiic6KDKnrQ=";
}; };
patches = [ ]; 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 in
pkgs.writeShellApplication { pkgs.writeShellApplication {
name = "package-sword"; name = "package-sword";
@@ -110,7 +115,7 @@
default = tar mingwW64; default = tar mingwW64;
x86 = tar mingwW64; x86 = tar mingwW64;
ucrt = tar ucrt64; ucrt = tar ucrt64;
ucrtAarch = tar arm.pkgsCross.ucrtAarch64; #ucrtAarch = tar ucrtAarch64;
update = pkgs.callPackage ./update.nix { }; update = pkgs.callPackage ./update.nix { };
}; };
}; };