replace naersk with crane, drop nix-filter
This commit is contained in:
parent
6a43030387
commit
33188c98ff
3 changed files with 73 additions and 142 deletions
|
|
@ -1,74 +1,71 @@
|
|||
{
|
||||
naersk',
|
||||
craneLib,
|
||||
pkgs,
|
||||
nix-filter,
|
||||
}:
|
||||
naersk'.buildPackage rec {
|
||||
src = nix-filter.lib.filter {
|
||||
root = ./.;
|
||||
include = [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
./src
|
||||
./Web437_IBM_BIOS.woff
|
||||
./README.md
|
||||
./LICENSE
|
||||
let
|
||||
commonArgs = {
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
};
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
strictDeps = true;
|
||||
buildInputs =
|
||||
with pkgs;
|
||||
[
|
||||
xe
|
||||
xz
|
||||
|
||||
roboto
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.isLinux (
|
||||
strictDeps = true;
|
||||
buildInputs =
|
||||
with pkgs;
|
||||
[
|
||||
# gpu
|
||||
libGL
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vulkan-tools-lunarg
|
||||
vulkan-extension-layer
|
||||
vulkan-validation-layers
|
||||
xe
|
||||
xz
|
||||
|
||||
# keyboard
|
||||
libxkbcommon
|
||||
|
||||
# font loading
|
||||
fontconfig
|
||||
freetype
|
||||
|
||||
# WINIT_UNIX_BACKEND=wayland
|
||||
wayland
|
||||
|
||||
# WINIT_UNIX_BACKEND=x11
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxi
|
||||
libx11
|
||||
libx11.dev
|
||||
roboto
|
||||
]
|
||||
)
|
||||
++ lib.optionals pkgs.stdenv.isDarwin (
|
||||
with pkgs.darwin.apple_sdk.frameworks;
|
||||
[
|
||||
Carbon
|
||||
QuartzCore
|
||||
AppKit
|
||||
]
|
||||
);
|
||||
++ lib.optionals pkgs.stdenv.isLinux (
|
||||
with pkgs;
|
||||
[
|
||||
# gpu
|
||||
libGL
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vulkan-tools-lunarg
|
||||
vulkan-extension-layer
|
||||
vulkan-validation-layers
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/servicepoint-simulator \
|
||||
--suffix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath buildInputs}
|
||||
'';
|
||||
}
|
||||
# keyboard
|
||||
libxkbcommon
|
||||
|
||||
# font loading
|
||||
fontconfig
|
||||
freetype
|
||||
|
||||
# WINIT_UNIX_BACKEND=wayland
|
||||
wayland
|
||||
|
||||
# WINIT_UNIX_BACKEND=x11
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxi
|
||||
libx11
|
||||
libx11.dev
|
||||
]
|
||||
)
|
||||
++ lib.optionals pkgs.stdenv.isDarwin (
|
||||
with pkgs.darwin.apple_sdk.frameworks;
|
||||
[
|
||||
Carbon
|
||||
QuartzCore
|
||||
AppKit
|
||||
]
|
||||
);
|
||||
};
|
||||
in
|
||||
craneLib.buildPackage (
|
||||
commonArgs
|
||||
// {
|
||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/servicepoint-simulator \
|
||||
--suffix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath commonArgs.buildInputs}
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue