meta: refactor repository

This commit is contained in:
Artur Manuel 2025-03-26 15:08:13 +00:00
commit 599fe1903f
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
28 changed files with 276 additions and 136 deletions

View file

@ -1,45 +1,25 @@
{
description = "Rust Developer Environment";
description = "CHANGE DESC";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust.url = "github:oxalica/rust-overlay";
systems.url = "github:nix-systems/default";
};
outputs = {
self,
nixpkgs,
rust,
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
packages = forAllSystems (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import rust)
];
};
inherit system;
outputs = { self, nixpkgs, systems, }:
let
pkgsFor = nixpkgs.legacyPackages;
forAllSystems = f:
nixpkgs.lib.genAttrs (import systems)
(system: f system pkgsFor.${system});
in {
rust-app = pkgs.callPackage ./nix/package.nix {};
default = self.packages.${system}.rust-app;
});
packages = forAllSystems (system: pkgs: {
default = pkgs.callPackage ./nix/package.nix { };
CHANGE_NAME = self.packages.${system}.default;
});
devShells = forAllSystems (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import rust)
];
};
inherit system;
in {
default = pkgs.callPackage ./nix/shell.nix {
inherit (self.packages.${system}) rust-app;
};
});
};
devShells = forAllSystems
(_: pkgs: { default = pkgs.callPackage ./nix/shell.nix { }; });
formatter =
forAllSystems (_: pkgs: pkgs.callPackage ./nix/formatter.nix { });
};
}