diff --git a/flake.lock b/flake.lock index 95fabf9c..619e50d1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,29 @@ { "nodes": { + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ], + "utils": [ + "flake-utils" + ] + }, + "locked": { + "lastModified": 1727447169, + "narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -21,6 +45,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -147,6 +187,7 @@ }, "root": { "inputs": { + "deploy-rs": "deploy-rs", "fenix": "fenix", "flake-utils": "flake-utils", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 00e3d9b1..d13cc6f7 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,11 @@ url = "github:nix-community/nixos-generators/7c60ba4bc8d6aa2ba3e5b0f6ceb9fc07bc261565"; inputs.nixpkgs.follows = "nixpkgs"; }; + deploy-rs = { + url = "github:serokell/deploy-rs"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "flake-utils"; + }; # Replaces the need to have a git submodule. seekSdk = { diff --git a/nix/shells/development.nix b/nix/shells/development.nix index 43b7ff2b..1952afbb 100644 --- a/nix/shells/development.nix +++ b/nix/shells/development.nix @@ -43,7 +43,7 @@ let in { # Everything in here becomes your shell (nix develop) - devShells.default = p.native.mkShell + default = p.native.mkShell { # Nix makes the following list of dependencies available to the development # environment. diff --git a/nix/shells/flake-outputs.nix b/nix/shells/flake-outputs.nix index 24545438..17d0c825 100644 --- a/nix/shells/flake-outputs.nix +++ b/nix/shells/flake-outputs.nix @@ -4,25 +4,25 @@ # It gets directly combined with the the toplevel flake.nix { inputs, instantiatedPkgs }: let - inherit (inputs) flake-utils seekSdk fenix; + inherit (inputs) flake-utils seekSdk fenix deploy-rs; tegraBashFHS = import ./tegra-bash.nix { pkgs = instantiatedPkgs.x86_64-linux; }; in -# This helper function is used to more easily abstract - # over the host platform. - # See https://github.com/numtide/flake-utils#eachdefaultsystem--system---attrs { # Used like a dev shell, but only for flashing. apps."x86_64-linux"."tegra-bash" = { type = "app"; program = "${tegraBashFHS}/bin/tegra-bash"; }; } // + # This helper function is used to more easily abstract + # over the host platform. + # See https://github.com/numtide/flake-utils#eachdefaultsystem--system---attrs flake-utils.lib.eachDefaultSystem (system: let nativePkgs = instantiatedPkgs.${system}; - mainShell = import ./development.nix { inherit system fenix instantiatedPkgs seekSdk; }; in - mainShell // { + devShells = import ./development.nix { inherit system fenix instantiatedPkgs seekSdk; }; # Lets you type `nix fmt` to format the flake. formatter = nativePkgs.nixpkgs-fmt; + packages.deploy-rs = deploy-rs.packages.${system}.deploy-rs; } )