Skip to content

Commit b938de2

Browse files
Add flake.nix for building with Nix.
1 parent d74a370 commit b938de2

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
/result

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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
description = "The most basic dynamic function row daemon possible";
3+
inputs = {
4+
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
5+
};
6+
outputs = { self, nixpkgs }:
7+
let
8+
pkgs = import nixpkgs { system = "aarch64-linux"; };
9+
in
10+
rec {
11+
packages.aarch64-linux.default = pkgs.rustPlatform.buildRustPackage {
12+
name = "tiny-dfr";
13+
version = "0.2.0";
14+
src = ./.;
15+
cargoLock = {
16+
lockFile = ./Cargo.lock;
17+
};
18+
nativeBuildInputs = [
19+
pkgs.pkg-config
20+
];
21+
buildInputs = [
22+
pkgs.cairo
23+
pkgs.libinput
24+
pkgs.freetype
25+
pkgs.fontconfig
26+
pkgs.glib
27+
pkgs.pango
28+
pkgs.gdk-pixbuf
29+
pkgs.libxml2
30+
];
31+
};
32+
devShells.aarch64-linux.default = pkgs.mkShell {
33+
inputsFrom = [
34+
packages.aarch64-linux.default
35+
];
36+
packages = [
37+
pkgs.rustfmt
38+
pkgs.rust-analyzer
39+
];
40+
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
41+
};
42+
};
43+
}

0 commit comments

Comments
 (0)