monorepo/flake.nix

90 lines
2.9 KiB
Nix
Raw Normal View History

2022-12-31 17:07:58 +00:00
{
description = "Lumenescent Dreams Tools";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
unstable.url = "nixpkgs/nixos-unstable";
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
2022-12-31 17:07:58 +00:00
};
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, ... }:
2022-12-31 17:07:58 +00:00
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";
2022-12-31 17:07:58 +00:00
in
pkgs.mkShell {
name = "ld-tools-devshell";
buildInputs = [
pkgs.clang
pkgs.entr
2023-02-06 14:36:02 +00:00
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
2023-02-06 14:36:02 +00:00
pkgs.gtk4
pkgs.nodejs
2022-12-31 17:07:58 +00:00
pkgs.openssl
pkgs.pipewire
2023-02-06 14:36:02 +00:00
pkgs.pkg-config
pkgs.sqlite
pkgs.rustup
2023-04-27 23:13:06 +00:00
pkgs.cargo-nextest
2023-04-02 19:48:12 +00:00
pkgs.crate2nix
2022-12-31 17:07:58 +00:00
];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
2022-12-31 17:07:58 +00:00
};
2023-04-02 19:48:12 +00:00
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
];
};
2023-04-02 19:48:12 +00:00
};
};
in {
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
rootFeatures = [ "screenplay" ];
2023-04-07 02:13:09 +00:00
release = true;
2023-04-02 19:48:12 +00:00
}).rootCrate.build;
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
release = true;
}).rootCrate.build;
2023-04-02 19:48:12 +00:00
};
2022-12-31 17:07:58 +00:00
};
}