62 lines
1.8 KiB
Nix
62 lines
1.8 KiB
Nix
|
{
|
||
|
description = "Lumenescent Dreams Tools";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||
|
unstable.url = "nixpkgs/nixos-unstable";
|
||
|
typeshare.url = "github:1Password/typeshare";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, unstable, typeshare, ... }:
|
||
|
let
|
||
|
version = builtins.string 0 8 self.lastModifiedDate;
|
||
|
supportedSystems = [ "x86_64-linux" ];
|
||
|
in
|
||
|
{
|
||
|
devShell."x86_64-linux" =
|
||
|
let
|
||
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||
|
pkgs-unstable = import unstable { system = "x86_64-linux"; };
|
||
|
in
|
||
|
pkgs.mkShell {
|
||
|
name = "ld-tools-devshell";
|
||
|
buildInputs = [
|
||
|
pkgs.cargo-nextest
|
||
|
pkgs.crate2nix
|
||
|
pkgs.glib
|
||
|
pkgs.gtk4
|
||
|
pkgs.libadwaita
|
||
|
pkgs.pkg-config
|
||
|
pkgs.rustup
|
||
|
];
|
||
|
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
||
|
ENV = "dev";
|
||
|
};
|
||
|
|
||
|
packages."x86_64-linux" =
|
||
|
let
|
||
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||
|
|
||
|
gtkNativeInputs = [
|
||
|
pkgs.gtk4
|
||
|
pkgs.pkg-config
|
||
|
];
|
||
|
|
||
|
cargoOverrides = pkgs: pkgs.buildRustCrate.override {
|
||
|
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
||
|
gobject-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
|
||
|
gio-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
|
||
|
gdk-pixbuf-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
|
||
|
};
|
||
|
};
|
||
|
|
||
|
cargo_nix = pkgs.callPackage ./Cargo.nix {
|
||
|
nixpkgs = nixpkgs;
|
||
|
buildRustCrateForPkgs = cargoOverrides;
|
||
|
};
|
||
|
in {
|
||
|
default = cargo_nix.workspaceMembers.resources_demo.build;
|
||
|
};
|
||
|
};
|
||
|
}
|