{ inputs = { flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = inputs @ { self, flake-utils, naersk, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = (import nixpkgs) { inherit system; }; naersk' = pkgs.callPackage naersk { }; mpdlisten = naersk'.buildPackage { src = ./.; }; in rec { # For `nix build` & `nix run`: defaultPackage = mpdlisten; packages = { inherit mpdlisten; }; # For `nix develop`: devShell = pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc cargo pkg-config openssl ]; }; nixosModules.mpdlisten = import ./nix/mpdlisten.nix; nixosModules.default = self.nixosModules.${system}.mpdlisten; } ); }