Compare commits
2
Commits
e63569a1ac
...
688e63ce04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
688e63ce04 | ||
|
|
52a5ec3954 |
@@ -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 }}"
|
||||
@@ -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
|
||||
@@ -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
@@ -1,33 +1,17 @@
|
||||
{
|
||||
"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": 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"
|
||||
}
|
||||
@@ -37,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": {
|
||||
@@ -65,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": {
|
||||
@@ -108,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": {
|
||||
@@ -124,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": {
|
||||
@@ -139,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": {
|
||||
@@ -155,7 +117,6 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"aarch_fix": "aarch_fix",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-root": "flake-root",
|
||||
"hooks": "hooks",
|
||||
|
||||
@@ -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 { };
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user