Skip to content

Commit 20259af

Browse files
Package for NixOS (#10)
1 parent 02bcc37 commit 20259af

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
3+
4+
outputs =
5+
{ self, nixpkgs }:
6+
{
7+
packages =
8+
nixpkgs.lib.genAttrs
9+
[
10+
"x86_64-linux"
11+
"aarch64-linux"
12+
]
13+
(system: rec {
14+
impala = nixpkgs.legacyPackages.${system}.callPackage ./package.nix { };
15+
default = impala;
16+
});
17+
};
18+
}

package.nix

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{ lib, rustPlatform }:
2+
3+
let
4+
cargo = (lib.importTOML ./Cargo.toml).package;
5+
in
6+
rustPlatform.buildRustPackage {
7+
pname = cargo.name;
8+
version = cargo.version;
9+
10+
src = ./.;
11+
12+
cargoLock = {
13+
lockFile = ./Cargo.lock;
14+
};
15+
16+
meta = {
17+
description = cargo.description;
18+
homepage = cargo.homepage;
19+
license = lib.licenses.gpl3Only;
20+
maintainers = with lib.maintainers; [ samuel-martineau ];
21+
};
22+
}

0 commit comments

Comments
 (0)