{ # heavily inspired by Mr. Raf (aka @NotAShelf) description = "A Rexie flake template"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; systems.url = "github:nix-systems/default"; }; outputs = { self, nixpkgs, systems, ... }: let pkgsOf = nixpkgs.legacyPackages; eachSystem = nixpkgs.lib.genAttrs (import systems); in { packages = eachSystem (system: { default = pkgsOf.${system}.callPackage ./nix/package.nix {}; # ALWAYS callPackage your package drvs }); devShells = eachSystem (system: { default = pkgsOf.${system}.callPackage ./nix/shell.nix { your-package-name = self.packages.${system}.default; }; ### nix/shell.nix ## {mkShell, your-package-name}: ## mkShell { ## inputsFrom = [your-package-name]; ## packages = [ ## # other dev packages ## ] ## } }); }; }