-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
123 lines (102 loc) · 2.78 KB
/
flake.nix
File metadata and controls
123 lines (102 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
inputs@{
flake-parts,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
];
perSystem =
{
system,
pkgs,
lib,
self',
...
}:
let
rust-bin = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
rustPlatform = pkgs.makeRustPlatform {
cargo = rust-bin;
rustc = rust-bin;
};
pnpmDeps = pkgs.pnpm.fetchDeps {
pname = "ltrait-ui-tauri-pnpmdeps";
version = "0.1.0";
src = ./.;
hash = "sha256-zbPyJhqvzXSoWbQ/QNFybNlypbFwBv4cCA3INAJu7Ow=";
};
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.rust-overlay.overlays.default
];
};
packages = {
default = rustPlatform.buildRustPackage rec {
pname = "ltrait-ui-tauri";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./src-tauri/Cargo.lock;
inherit pnpmDeps;
nativeBuildInputs = with pkgs; [
cargo-tauri.hook
nodejs
pnpm.configHook
pkg-config
wrapGAppsHook4
];
buildInputs =
with pkgs;
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [
glib-networking # Most Tauri apps need networking
webkitgtk_4_1
];
cargoRoot = "src-tauri";
buildAndTestSubdir = cargoRoot;
};
};
devShells.default = pkgs.mkShell {
inputsFrom = [
self'.packages.default
];
name = "ltrait";
buildInputs =
with pkgs;
[
pnpm
rust-bin
cargo-nextest
cargo-tauri
]
++ [
at-spi2-atk
atkmm
cairo
gdk-pixbuf
glib
gtk3
harfbuzz
librsvg
libsoup_3
pango
]
++ lib.optionals stdenv.hostPlatform.isLinux [
webkitgtk_4_1
];
};
};
};
}