File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,3 +125,20 @@ jobs:
125125 - run : |
126126 cargo login <<< "${{secrets.CRATES_IO_TOKEN}}"
127127 cargo publish
128+
129+ nix :
130+ name : NixOS
131+ runs-on : ubuntu-latest
132+ steps :
133+ - name : Checkout code
134+ uses : actions/checkout@v6
135+ - name : Install Nix
136+ uses : cachix/install-nix-action@v31.9.0
137+ with :
138+ nix_path : nixpkgs=channel:nixos-unstable
139+ - name : Build
140+ run : nix --experimental-features 'nix-command flakes' build
141+ - name : Flake check
142+ run : nix --experimental-features 'nix-command flakes' flake check
143+ - name : Format
144+ run : nix --experimental-features 'nix-command flakes' fmt . && git diff --exit-code
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "shvcall"
33description = " CLI utility to invoke remote SHV RPC calls"
44license = " MIT"
55repository = " https://github.com/silicon-heaven/shvcall-rs"
6- version = " 3.9.5 "
6+ version = " 3.9.6 "
77edition = " 2024"
88
99[[bin ]]
Original file line number Diff line number Diff line change 1+ {
2+ description = "Rust implementation of headless Silicon Heaven applications" ;
3+
4+ outputs = {
5+ self ,
6+ systems ,
7+ nixpkgs ,
8+ } : let
9+ inherit ( builtins ) head match readFile ;
10+ inherit ( nixpkgs . lib ) genAttrs ;
11+ forSystems = genAttrs ( import systems ) ;
12+ withPkgs = func : forSystems ( system : func self . legacyPackages . ${ system } ) ;
13+
14+ package = { rustPlatform } :
15+ rustPlatform . buildRustPackage {
16+ pname = "shvcall-rs" ;
17+ version = head (
18+ match ".*\n version[ ]*=[ ]*\" ([^\" ]+)\" \n .*" ( readFile ./Cargo.toml )
19+ ) ;
20+
21+ src = ./. ;
22+ cargoLock = {
23+ lockFile = ./Cargo.lock ;
24+ } ;
25+ doCheck = true ;
26+
27+ meta = with nixpkgs . lib ; {
28+ description = "CLI utility to invoke remote SHV RPC calls" ;
29+ homepage = "https://github.com/silicon-heaven/shvcall-rs/" ;
30+ license = licenses . mit ;
31+ mainProgram = "shvcall" ;
32+ } ;
33+ } ;
34+ in {
35+ overlays . default = final : _ : {
36+ shvcall-rs = final . callPackage package { } ;
37+ } ;
38+
39+ packages = withPkgs ( pkgs : { default = pkgs . shvcall-rs ; } ) ;
40+
41+ legacyPackages =
42+ forSystems ( system :
43+ nixpkgs . legacyPackages . ${ system } . extend self . overlays . default ) ;
44+
45+ formatter = withPkgs ( pkgs : pkgs . alejandra ) ;
46+ } ;
47+ }
You can’t perform that action at this time.
0 commit comments