Skip to content

Commit

Permalink
Package for NixOS (#21)
Browse files Browse the repository at this point in the history
Fix #19
  • Loading branch information
Samuel-Martineau committed Sep 1, 2024
1 parent 979173e commit ced9f86
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
27 changes: 27 additions & 0 deletions flake.lock

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

18 changes: 18 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

outputs =
{ self, nixpkgs }:
{
packages =
nixpkgs.lib.genAttrs
[
"x86_64-linux"
"aarch64-linux"
]
(system: rec {
bluetui = nixpkgs.legacyPackages.${system}.callPackage ./package.nix { };
default = bluetui;
});
};
}
31 changes: 31 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
pkg-config,
dbus,
}:

let
cargo = (lib.importTOML ./Cargo.toml).package;
in
rustPlatform.buildRustPackage {
pname = cargo.name;
version = cargo.version;

src = ./.;

cargoLock = {
lockFile = ./Cargo.lock;
};

nativeBuildInputs = [ pkg-config ];

buildInputs = [ dbus ];

meta = {
description = cargo.description;
homepage = cargo.homepage;
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ samuel-martineau ];
};
}

0 comments on commit ced9f86

Please sign in to comment.