gitea action

This commit is contained in:
2026-08-16 10:57:49 -06:00
parent 1b329c6432
commit ab77858eda
4 changed files with 42 additions and 8 deletions
+11
View File
@@ -0,0 +1,11 @@
name: build
on: [push]
jobs:
build:
runs-on: nixos
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: build wiktlarp
run: nix build -L .#wiktlarp
+8 -5
View File
@@ -1,9 +1,12 @@
{ rustPlatform { crane-lib
, lib
}: }:
rustPlatform.buildRustPackage (finalAttrs: { crane-lib.buildPackage (lib.fix (finalAttrs: {
pname = "wiktlarp-tf2"; pname = "wiktlarp";
version = "0.1.0"; version = "0.1.0";
src = ./.; src = ./.;
cargoLock.lockFile = ./Cargo.lock; # cargoLock.lockFile = ./Cargo.lock;
}) doCheck = true;
meta.mainProgram = "wiktlarp";
}))
Generated
+16
View File
@@ -1,5 +1,20 @@
{ {
"nodes": { "nodes": {
"crane": {
"locked": {
"lastModified": 1785782307,
"narHash": "sha256-MPaRdVkf6zZP5fCPxYCi8Dr4pZzgmXzg8T9nVEbp3Mw=",
"owner": "ipetkov",
"repo": "crane",
"rev": "2c71e194474d13de031d729b729c968ddbe3507f",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1775095191, "lastModified": 1775095191,
@@ -18,6 +33,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }
+7 -3
View File
@@ -1,6 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
}; };
outputs = { self, nixpkgs, ... }@inputs: outputs = { self, nixpkgs, ... }@inputs:
@@ -23,10 +24,13 @@
# Exposed as a REPL convenience. # Exposed as a REPL convenience.
_pkgs = each-system ({ pkgs, ... }: pkgs); _pkgs = each-system ({ pkgs, ... }: pkgs);
packages = each-system ({ pkgs, ... }: { packages = each-system ({ pkgs, lib, ... }: (lib.fix (p: {
default = pkgs.callPackage ./default.nix {}; default = p.wiktlarp;
wiktlarp = pkgs.callPackage ./default.nix {
crane-lib = inputs.crane.mkLib pkgs;
};
db = pkgs.callPackage ./db {}; db = pkgs.callPackage ./db {};
}); })));
devShells = each-system ({ pkgs, system, ... }: { devShells = each-system ({ pkgs, system, ... }: {
default = pkgs.mkShell { default = pkgs.mkShell {