about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <git@emile.space>2023-06-26 00:26:03 +0200
committerEmile <git@emile.space>2023-06-26 00:26:03 +0200
commit34e7b5d1ea96baacc98601c5fda19cd28aeae750 (patch)
tree56dda0413b4a2b29a12dcabb6a87596ce079a8dc
parent3cc90a72d9f26f03da34f3fe147cb6167e5cac59 (diff)
moved the build into an own package
-rw-r--r--flake.nix46
1 files changed, 21 insertions, 25 deletions
diff --git a/flake.nix b/flake.nix
index 3500c80..aa094e1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -6,33 +6,29 @@
   };
 
   outputs = { self, flake-utils, naersk, nixpkgs }:
-    #flake-utils.lib.eachDefaultSystem (system:
-      let
-        pkgs = (import nixpkgs) {
-          # inherit system;
-          system = "x86_64-linux";
-        };
-
-        naersk' = pkgs.callPackage naersk {};
-        
-      in rec {
-        # For `nix build` & `nix run`:
-        defaultPackage = naersk'.buildPackage {
-          src = ./.;
-        };
+    let
+      pkgs = (import nixpkgs) {
+        system = "x86_64-linux";
+      };
 
-        # For `nix develop` (optional, can be skipped):
-        devShell = pkgs.mkShell {
-          nativeBuildInputs = with pkgs; [ rustc cargo ];
-        };
+      naersk' = pkgs.callPackage naersk {};
+      
+    in rec {
+      packages."x86_64-linux".vokobe = naersk'.buildPackage {
+        src = ./.;
+      };
+    
+      # For `nix build` & `nix run`:
+      defaultPackage = packages."x86_64-linux".vokobe;
 
-        # hydraJobs."<attr>"."<system>" = derivation;
+      # For `nix develop` (optional, can be skipped):
+      devShell = pkgs.mkShell {
+        nativeBuildInputs = with pkgs; [ rustc cargo ];
+      };
 
-        hydraJobs = {
-          build."x86_64-linux" = naersk'.buildPackage {
-            src = ./.;
-          };
-        };
+      # hydraJobs."<attr>"."<system>" = derivation;
+      hydraJobs = {
+        build."x86_64-linux" = packages."x86_64-linux".vokobe;
       };
-    # );
+    };
 }
\ No newline at end of file