-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding flake * fix README * README: fix grammar * README: add nix profile example * README: make linter happy * README: remove multiple blank lines * Update README.md Co-authored-by: Pavel Ivanov <[email protected]> * Update README.md Co-authored-by: Pavel Ivanov <[email protected]> * READMDE: align nix-flake section --------- Co-authored-by: Pavel Ivanov <[email protected]>
- Loading branch information
Showing
6 changed files
with
204 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
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 |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
/*.log.xz | ||
/*.log.zst | ||
/target | ||
|
||
# devenv | ||
.direnv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
flake-parts.url = "github:hercules-ci/flake-parts"; | ||
}; | ||
|
||
outputs = inputs@{ flake-parts, ... }: | ||
flake-parts.lib.mkFlake { inherit inputs; } | ||
{ | ||
systems = [ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
"x86_64-darwin" | ||
"aarch64-darwin" | ||
]; | ||
|
||
perSystem = { self', lib, system, pkgs, config, ... }: { | ||
_module.args.pkgs = import inputs.nixpkgs { | ||
inherit system; | ||
|
||
overlays = with inputs; [ | ||
rust-overlay.overlays.default | ||
]; | ||
}; | ||
|
||
packages.default = pkgs.callPackage ./nix/package.nix { }; | ||
|
||
devShells.default = self'.packages.default; | ||
}; | ||
}; | ||
} |
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,30 @@ | ||
{ lib | ||
, rustPlatform | ||
, | ||
}: | ||
let | ||
cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml); | ||
in | ||
rustPlatform.buildRustPackage { | ||
pname = cargoToml.package.name; | ||
version = cargoToml.workspace.package.version; | ||
|
||
src = builtins.path { | ||
path = ../.; | ||
}; | ||
|
||
cargoLock = { | ||
lockFile = ../Cargo.lock; | ||
outputHashes = { | ||
"htp-0.4.2" = "sha256-oYLN0aCLIeTST+Ib6OgWqEgu9qyI0n5BDtIUIIThLiQ="; | ||
"wildflower-0.3.0" = "sha256-vv+ppiCrtEkCWab53eutfjHKrHZj+BEAprV5by8plzE="; | ||
}; | ||
}; | ||
|
||
meta = { | ||
description = cargoToml.package.description; | ||
homepage = cargoToml.workspace.package.repository; | ||
license = lib.licenses.mit; | ||
mainProgram = cargoToml.package.name; | ||
}; | ||
} |