diff --git a/parts/templates/c/flake.nix b/parts/templates/c/flake.nix index 835fb8bb3..34581583c 100644 --- a/parts/templates/c/flake.nix +++ b/parts/templates/c/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/go/flake.nix b/parts/templates/go/flake.nix index ae23cd131..92fbc6eac 100644 --- a/parts/templates/go/flake.nix +++ b/parts/templates/go/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/haskell/flake.nix b/parts/templates/haskell/flake.nix index f41889322..39cfc0fe8 100644 --- a/parts/templates/haskell/flake.nix +++ b/parts/templates/haskell/flake.nix @@ -17,7 +17,7 @@ { packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = self.packages.example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/latex/flake.nix b/parts/templates/latex/flake.nix index 99989ebb1..3fd106ff8 100644 --- a/parts/templates/latex/flake.nix +++ b/parts/templates/latex/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/node/flake.nix b/parts/templates/node/flake.nix index 304655da7..9122ec842 100644 --- a/parts/templates/node/flake.nix +++ b/parts/templates/node/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/python/flake.nix b/parts/templates/python/flake.nix index c73d34da3..128a24a5e 100644 --- a/parts/templates/python/flake.nix +++ b/parts/templates/python/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: { diff --git a/parts/templates/rust/flake.nix b/parts/templates/rust/flake.nix index 5fc9ea6e0..c1719c6bc 100644 --- a/parts/templates/rust/flake.nix +++ b/parts/templates/rust/flake.nix @@ -6,7 +6,7 @@ }; outputs = - { nixpkgs, ... }: + { self, nixpkgs }: let forAllSystems = function: @@ -15,9 +15,9 @@ ); in { - packages = forAllSystems (pkgs: rec { + packages = forAllSystems (pkgs: { example = pkgs.callPackage ./default.nix { }; - default = example; + default = self.packages.${pkgs.stdenv.hostPlatform.system}.example; }); devShells = forAllSystems (pkgs: {