Skip to content
This repository has been archived by the owner on Jan 25, 2025. It is now read-only.

Commit

Permalink
added flake
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Nov 26, 2023
1 parent 991fedb commit 09f3752
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
*.iml
.idea
result
100 changes: 100 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";

fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
};
in
rec {
packages = {
zia-client = let manifest = (pkgs.lib.importTOML ./zia-client/Cargo.toml).package; in pkgs.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
cargoBuildFlags = "-p ${manifest.name}";
nativeBuildInputs = [ fenix.packages.${system}.stable.toolchain ];
};

zia-server = let manifest = (pkgs.lib.importTOML ./zia-server/Cargo.toml).package; in pkgs.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
cargoBuildFlags = "-p ${manifest.name}";
nativeBuildInputs = [ fenix.packages.${system}.stable.toolchain ];
};
};
}
);
}

0 comments on commit 09f3752

Please sign in to comment.