{ description = "Simple (insecure) implementation of RSA in C"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = inputs@{ self, ... }: inputs.flake-utils.lib.eachDefaultSystem ( system: let pkgs = inputs.nixpkgs.legacyPackages.${system}; in { packages.default = pkgs.stdenv.mkDerivation { name = "rsa"; src = self; buildInputs = with pkgs; [ gcc gnumake ]; buildPhase = '' make build ''; installPhase = '' mkdir -p $out/bin/ cp -r rsa.o $out/bin/rsa ''; }; apps.default = inputs.flake-utils.lib.mkApp { drv = self.packages.${system}.default; }; } ); }