From def8a94c3cf46e935fc3c9ae6024c24a8245a8f8 Mon Sep 17 00:00:00 2001 From: Tulili Date: Sun, 12 May 2024 17:27:54 -0300 Subject: [PATCH] chore: cleanup nix flake --- flake.nix | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/flake.nix b/flake.nix index 4e4aa2a..fa41d8c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,9 @@ -# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.9) { - description = "Project Template"; + description = "Atomic Studio CLI"; - inputs = { - flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz"; - utility-flake.url = "https://flakehub.com/f/atomic-studio-org/Utility-Flake-Library/*.tar.gz"; - nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz"; - }; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - outputs = { self, flake-schemas, nixpkgs, utility-flake }: + outputs = { self, nixpkgs }: let supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { @@ -16,13 +11,7 @@ }); in { - schemas = flake-schemas.schemas; - - formatter = forEachSupportedSystem ({ pkgs }: pkgs.nixpkgs-fmt); - - checks = forEachSupportedSystem ({ pkgs }: { - inherit (utility-flake.checks.${pkgs.system}) pre-commit-check; - }); + formatter = forEachSupportedSystem ({ pkgs }: pkgs.nixfmt-rfc-style); packages = forEachSupportedSystem ({ pkgs }: rec { default = studio; @@ -34,18 +23,17 @@ buildInputs = with pkgs; [ podman distrobox ]; buildCommand = '' - mkdir -p $out/bin $out/libexec - cp $src/src/${pname} $out/bin - substituteInPlace $out/bin/${pname} --replace './libexec' "$out/libexec" - cp -r $src/src/libexec/* $out/libexec - ''; + mkdir -p $out/bin $out/libexec + cp $src/src/${pname} $out/bin + substituteInPlace $out/bin/${pname} --replace './libexec' "$out/libexec" + cp -r $src/src/libexec/* $out/libexec + ''; }; - inherit (utility-flake.packages.${pkgs.system}) cosign-generate; }); devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { - packages = utility-flake.lib.${pkgs.system}.devShellPackages ++ (with pkgs; [ earthly go-task melange apko ]); + packages = with pkgs; [ earthly go-task melange apko rpm ]; }; }); };