Removed use-ssl option as it does not make sense to disable SSL. Also added default overlay

updated INSTALL.md with flake overlay
This commit is contained in:
zsuper 2025-04-04 09:52:26 -07:00
parent 85eeaabe28
commit b4ed20677c
2 changed files with 5 additions and 16 deletions

View file

@ -12,7 +12,7 @@ and optionally the manual-page from the debian-subdirectory to your manpath
# Nix Flakes # Nix Flakes
> NOTE: The Nix Flake installation currently only supports the default Makefile flags (i.e. GNU system assumed + SSL enabled). > NOTE: The Nix Flake installation currently only supports the `x86_64-linux` platform, and has not been tested on other architectures.
A simple Nix Flake is included to allow for use via flake inputs. To create a temporary Nix Shell with access to the `proxytunnel` binary, you can run the command: A simple Nix Flake is included to allow for use via flake inputs. To create a temporary Nix Shell with access to the `proxytunnel` binary, you can run the command:
```console ```console
@ -37,16 +37,11 @@ If you instead want to include it as a flake input, the following `flake.nix` sh
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [ overlays = [
(_: _: { # Add proxytunnel's default features to your nixpkgs
# Add an overlay with this line to add proxytunnel's default features to your nixpkgs proxytunnel = proxytunnel.overlays.default;
proxytunnel = proxytunnel.packages.${system}.default;
# Add an overlay with this line to override options (i.e. disable SSL support)
proxytunnel = proxytunnel.packages.${system}.default.override { use-ssl = false };
# For a full list of override options, see `nix/proxytunnel.nix` # For a full list of override options, see `nix/proxytunnel.nix`
}) ];
]
}; };
in { in {
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
@ -57,7 +52,6 @@ If you instead want to include it as a flake input, the following `flake.nix` sh
# And include any other packages as desired... # And include any other packages as desired...
pkgs.gcc pkgs.gcc
pkgs.glibc.dev
# ... # ...
]; ];
}; };

View file

@ -1,14 +1,9 @@
{ {
use-ssl ? true,
gnu-system ? true, gnu-system ? true,
set-proc-title ? true, set-proc-title ? true,
pkgs, pkgs,
}: let }: let
optflags = "${ optflags = "-DUSE_SSL ${
if use-ssl
then "-DUSE_SSL"
else ""
} ${
if gnu-system if gnu-system
then "-DHAVE_GETOPT_LONG" then "-DHAVE_GETOPT_LONG"
else "" else ""