-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve nix infrastructure
- Loading branch information
Showing
7 changed files
with
143 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Update flake.lock | ||
on: | ||
workflow_dispatch: # allows manual triggering | ||
schedule: | ||
- cron: '0 0 * * 1' # runs weekly on Monday at 00:00 | ||
|
||
jobs: | ||
lockfile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: Install Nix magic cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
- name: Update flake.lock | ||
uses: DeterminateSystems/update-flake-lock@main | ||
with: | ||
pr-title: "chore: update flake.lock" # Title of PR to be created | ||
pr-labels: | # Labels to be set on the PR | ||
dependencies | ||
automated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
{ | ||
pkgs, | ||
pname, | ||
version, | ||
... | ||
}: let | ||
rustPlatform = pkgs.makeRustPlatform { | ||
rustc = pkgs.customRustToolchain; | ||
cargo = pkgs.customRustToolchain; | ||
}; | ||
{ pkgs | ||
, pname | ||
, version | ||
, ... | ||
}: | ||
let | ||
inherit (pkgs) | ||
rustPlatform; | ||
in | ||
rustPlatform.buildRustPackage { | ||
inherit pname version; | ||
rustPlatform.buildRustPackage { | ||
inherit pname version; | ||
|
||
src = pkgs.lib.cleanSource ../.; | ||
src = pkgs.lib.cleanSource ../.; | ||
|
||
buildInputs = | ||
pkgs.lib.optionals pkgs.stdenv.isDarwin | ||
[pkgs.darwin.apple_sdk.frameworks.CoreServices]; | ||
buildInputs = | ||
pkgs.lib.optionals pkgs.stdenv.isDarwin | ||
[ pkgs.darwin.apple_sdk.frameworks.CoreServices ]; | ||
|
||
makeFlags = ["PREFIX=$(out)"]; | ||
makeFlags = [ "PREFIX=$(out)" ]; | ||
|
||
postBuild = '' | ||
pandoc --standalone --to man public/man.md -o public/mdzk.1 | ||
''; | ||
postBuild = '' | ||
pandoc --standalone --to man public/man.md -o public/mdzk.1 | ||
''; | ||
|
||
preInstall = '' | ||
install -d $out/share/man/man1/ | ||
install -pm 0644 public/mdzk.1 $out/share/man/man1/ | ||
''; | ||
preInstall = '' | ||
install -d $out/share/man/man1/ | ||
install -pm 0644 public/mdzk.1 $out/share/man/man1/ | ||
''; | ||
|
||
nativeBuildInputs = with pkgs; [pandoc]; | ||
nativeBuildInputs = with pkgs; [ pandoc ]; | ||
|
||
cargoSha256 = "sha256-2exNoGAj2ndVRu90tCv+CEn3nPSBtcjHzJcPkZKBndA="; | ||
} | ||
cargoHash = "sha256-2exNoGAj2ndVRu90tCv+CEn3nPSBtcjHzJcPkZKBndA="; | ||
} |
Oops, something went wrong.