mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
Use rust-overlay for flake build
This commit is contained in:
parent
ca0ceb2c2d
commit
aaed546947
@ -92,9 +92,33 @@
|
|||||||
"harfbuzz": "harfbuzz",
|
"harfbuzz": "harfbuzz",
|
||||||
"libpng": "libpng",
|
"libpng": "libpng",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"rust-overlay": "rust-overlay",
|
||||||
"zlib": "zlib"
|
"zlib": "zlib"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1701569797,
|
||||||
|
"narHash": "sha256-ObvQFAPpC5IVbI2GHedSTQVzYxht2qhBgHHQnh3mYTs=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "516c9477757b628b157780d96d84e8c82b46dc99",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
flake-utils.follows = "flake-utils";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
freetype2 = {
|
freetype2 = {
|
||||||
url = "github:wez/freetype2/de8b92dd7ec634e9e2b25ef534c54a3537555c11";
|
url = "github:wez/freetype2/de8b92dd7ec634e9e2b25ef534c54a3537555c11";
|
||||||
@ -29,6 +36,7 @@
|
|||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
|
rust-overlay,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
freetype2,
|
freetype2,
|
||||||
harfbuzz,
|
harfbuzz,
|
||||||
@ -37,7 +45,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
overlays = [(import rust-overlay)];
|
||||||
|
pkgs = import nixpkgs {inherit system overlays;};
|
||||||
|
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
@ -48,6 +57,12 @@
|
|||||||
ncurses # tic for terminfo
|
ncurses # tic for terminfo
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
|
|
||||||
|
rust-bin.stable.latest.minimal
|
||||||
|
rust-bin.stable.latest.clippy
|
||||||
|
|
||||||
|
rust-bin.nightly.latest.rustfmt
|
||||||
|
rust-bin.nightly.latest.rust-analyzer
|
||||||
]
|
]
|
||||||
++ lib.optional stdenv.isDarwin perl;
|
++ lib.optional stdenv.isDarwin perl;
|
||||||
|
|
||||||
@ -76,8 +91,13 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
libPath = lib.makeLibraryPath (with pkgs; [libGL vulkan-loader]);
|
libPath = lib.makeLibraryPath (with pkgs; [libGL vulkan-loader]);
|
||||||
|
|
||||||
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
cargo = pkgs.rust-bin.stable.latest.minimal;
|
||||||
|
rustc = pkgs.rust-bin.stable.latest.minimal;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
packages.default = pkgs.rustPlatform.buildRustPackage rec {
|
packages.default = rustPlatform.buildRustPackage rec {
|
||||||
inherit buildInputs nativeBuildInputs;
|
inherit buildInputs nativeBuildInputs;
|
||||||
|
|
||||||
name = "wezterm";
|
name = "wezterm";
|
||||||
@ -120,16 +140,7 @@
|
|||||||
|
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
name = "wezterm-shell";
|
name = "wezterm-shell";
|
||||||
|
inherit buildInputs nativeBuildInputs;
|
||||||
inherit nativeBuildInputs;
|
|
||||||
buildInputs =
|
|
||||||
buildInputs
|
|
||||||
++ (with pkgs; [
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
rustPackages.clippy
|
|
||||||
]);
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH = libPath;
|
LD_LIBRARY_PATH = libPath;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user