98 lines
3.2 KiB
Nix
98 lines
3.2 KiB
Nix
{
|
|
description = "Lumenescent Dreams Tools";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-22.11";
|
|
unstable.url = "nixpkgs/nixos-unstable";
|
|
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
|
|
typeshare.url = "github:1Password/typeshare";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, 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"; };
|
|
cargo2nix = pkgs-cargo2nix.packages."x86_64-linux";
|
|
armPkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
crossSystem = pkgs.lib.systems.examples.raspberryPi;
|
|
};
|
|
in
|
|
pkgs.mkShell {
|
|
name = "ld-tools-devshell";
|
|
buildInputs = [
|
|
armPkgs.stdenv.cc
|
|
pkgs.clang
|
|
pkgs.entr
|
|
pkgs.glade
|
|
pkgs.glib
|
|
pkgs.gst_all_1.gst-plugins-bad
|
|
pkgs.gst_all_1.gst-plugins-base
|
|
pkgs.gst_all_1.gst-plugins-good
|
|
pkgs.gst_all_1.gst-plugins-ugly
|
|
pkgs.gst_all_1.gstreamer
|
|
pkgs.gtk4
|
|
pkgs.nodejs
|
|
pkgs.openssl
|
|
pkgs.pipewire
|
|
pkgs.pkg-config
|
|
pkgs.sqlite
|
|
pkgs.rustup
|
|
pkgs.cargo-nextest
|
|
pkgs.crate2nix
|
|
pkgs.wasm-pack
|
|
typeshare.packages."x86_64-linux".default
|
|
];
|
|
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
|
};
|
|
packages."x86_64-linux" =
|
|
let
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
standardOverride = attrs: {
|
|
nativeBuildInputs = [
|
|
pkgs.pkg-config
|
|
pkgs.gtk4
|
|
];
|
|
verbose = true;
|
|
};
|
|
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
|
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
|
cairo-sys-rs = standardOverride;
|
|
graphene-sys = standardOverride;
|
|
gobject-sys = standardOverride;
|
|
pango-sys = standardOverride;
|
|
gio-sys = standardOverride;
|
|
gdk-pixbuf-sys = standardOverride;
|
|
gdk4-sys = standardOverride;
|
|
gsk4-sys = standardOverride;
|
|
gtk4-sys = standardOverride;
|
|
kifu-gtk = attrs: {
|
|
nativeBuildInputs = [
|
|
pkgs.glib
|
|
];
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
|
|
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
|
|
inherit pkgs;
|
|
buildRustCrateForPkgs = customBuildInfo;
|
|
rootFeatures = [ "screenplay" ];
|
|
release = true;
|
|
}).rootCrate.build;
|
|
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
|
|
inherit pkgs;
|
|
buildRustCrateForPkgs = customBuildInfo;
|
|
release = true;
|
|
}).rootCrate.build;
|
|
};
|
|
};
|
|
}
|