monorepo/flake.nix

131 lines
3.9 KiB
Nix

{
description = "Lumenescent Dreams Tools";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable";
typeshare.url = "github:1Password/typeshare";
crane.url = "github:ipetkov/crane";
};
outputs =
{
self,
nixpkgs,
unstable,
typeshare,
crane,
...
}:
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.cargo-watch
pkgs.clang
pkgs.crate2nix
pkgs.trunk
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.libadwaita
pkgs.librsvg
pkgs.nodejs
pkgs.openssl
pkgs.pipewire
pkgs.pkg-config
pkgs.rustup
pkgs.sqlite
pkgs.cargo-nextest
pkgs.wasm-pack
pkgs.sqlx-cli
pkgs.udev
pkgs.wasm-pack
pkgs.go-task
pkgs.nixfmt-rfc-style
typeshare.packages."x86_64-linux".default
pkgs.nodePackages_latest.typescript-language-server
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
ENV = "dev";
};
packages."x86_64-linux" =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
craneLib = crane.mkLib pkgs;
# gtkNativeInputs = [
# pkgs.pkg-config
# pkgs.gtk4
# pkgs.libadwaita
# pkgs.wrapGAppsHook4
# ];
# cargoOverrides =
# pkgs:
# pkgs.buildRustCrate.override {
# defaultCrateOverrides = pkgs.defaultCrateOverrides // {
# gobject-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# gio-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# gdk-pixbuf-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# libadwaita-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; };
# fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; };
# otg-gtk = import ./otg/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; };
# };
# };
# cargo_nix = pkgs.callPackage ./Cargo.nix {
# nixpkgs = nixpkgs;
# buildRustCrateForPkgs = cargoOverrides;
# };
in
rec {
# cyber-slides = cargo_nix.workspaceMembers.cyber-slides.build;
# cyberpunk-splash = cargo_nix.workspaceMembers.cyberpunk-splash.build;
# dashboard = cargo_nix.workspaceMembers.dashboard.build;
# file-service = cargo_nix.workspaceMembers.file-service.build;
# fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build;
# otg-gtk = cargo_nix.workspaceMembers.otg-gtk.build;
l10n-db =
(import ./rust.nix {
pkgs = pkgs;
craneLib = craneLib;
}).l10n-db;
all = pkgs.symlinkJoin {
name = "all";
paths = [
# cyber-slides
# cyberpunk-splash
# dashboard
# file-service
# fitnesstrax
l10n-db
# otg-gtk
];
};
default = all;
};
};
}