File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 } ;
66 outputs = { self , nixpkgs } :
77 let
8- pkgs = import nixpkgs { system = "aarch64-linux" ; } ;
8+ supportedSystems = [ "x86_64-linux" "aarch64-linux" ] ;
9+ forAllSystems = nixpkgs . lib . genAttrs supportedSystems ;
10+ pkgsFor = forAllSystems ( system : import nixpkgs { inherit system ; } ) ;
911 in
1012 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- } ;
13+ packages = forAllSystems ( system :
14+ let
15+ pkgs = pkgsFor . ${ system } ;
16+ in
17+ {
18+ default = pkgs . rustPlatform . buildRustPackage {
19+ name = "tiny-dfr" ;
20+ version = "0.2.0" ;
21+ src = ./. ;
22+ cargoLock = {
23+ lockFile = ./Cargo.lock ;
24+ } ;
25+ nativeBuildInputs = [
26+ pkgs . pkg-config
27+ ] ;
28+ buildInputs = [
29+ pkgs . cairo
30+ pkgs . libinput
31+ pkgs . freetype
32+ pkgs . fontconfig
33+ pkgs . glib
34+ pkgs . pango
35+ pkgs . gdk-pixbuf
36+ pkgs . libxml2
37+ ] ;
38+ } ;
39+ }
40+ ) ;
41+
42+ devShells = forAllSystems ( system :
43+ let
44+ pkgs = pkgsFor . ${ system } ;
45+ in
46+ {
47+ default = pkgs . mkShell {
48+ inputsFrom = [
49+ packages . ${ system } . default
50+ ] ;
51+ packages = [
52+ pkgs . rustfmt
53+ pkgs . rust-analyzer
54+ ] ;
55+ RUST_SRC_PATH = "${ pkgs . rustPlatform . rustLibSrc } " ;
56+ } ;
57+ }
58+ ) ;
4259 } ;
4360}
You can’t perform that action at this time.
0 commit comments