| 6 Jun 2024 |
Manu [tennox] | If I add this input
repo = {
url = "path:/home/manu/.../repo";
flake = false;
};
I can get the flake contents via
inputs.repo.outPath
| 18:06:46 |
| @aidalgol:matrix.org left the room. | 19:23:33 |
| 7 Jun 2024 |
| @abmantis:abcosta.com left the room. | 01:02:04 |
| Sean joined the room. | 15:17:50 |
| 10 Jun 2024 |
| @clvxaz:matrix.org joined the room. | 17:29:27 |
| @clvxaz:matrix.org left the room. | 17:29:43 |
| dvd joined the room. | 19:57:41 |
| 11 Jun 2024 |
| aos joined the room. | 15:17:28 |
| camzer joined the room. | 23:50:52 |
| 12 Jun 2024 |
| Lorenz Leutgeb removed their display name Lorenz Leutgeb. | 00:31:04 |
| Lorenz Leutgeb set their display name to Lorenz Leutgeb. | 00:32:37 |
| 18 Jun 2024 |
| 👉@crystallinefire:chat.solarpunk.moe joined the room. | 18:13:26 |
| 19 Jun 2024 |
| gas.station.sushi joined the room. | 00:14:50 |
| qu4pk4 joined the room. | 12:10:17 |
qu4pk4 | Hi guys, I am trying to create a Flake that builds older version of OpenSSL. However, I am getting infinite recursion - I suspect it is because I use fetchurl which depends on OpenSSL (I infer this from this comment: https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/development/libraries/openssl/default.nix#L15). I can send the bare flake.nix if that would help. | 12:23:07 |
qu4pk4 | I am still quite new to flakes and also to overlays in particular. | 12:23:29 |
qu4pk4 | {
description = "OpenSSL version";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (final: prev: {
openssl = prev.openssl.overrideAttrs (old: rec{
version = "0.1";
src = prev.pkgs.fetchurl {
url = "https://www.openssl.org/source/openssl-${version}.tar.gz";
hash = "";
};
});
}) ];
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs;
{
devShells.default = mkShell { buildInputs = [ openssl ]; };
}
);
}
| 12:24:30 |
qu4pk4 | * {
description = "OpenSSL version";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (final: prev: {
openssl = prev.openssl.overrideAttrs (old: rec{
version = "0.1";
src = prev.pkgs.fetchurl {
url = "https://www.openssl.org/source/openssl-${version}.tar.gz";
hash = "";
};
});
}) ];
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs;
{
devShells.default = mkShell { buildInputs = [ openssl ]; };
}
);
}
| 12:24:39 |
nim65s | do you really need an overlay ? ie. do you want a whole nixpkgs where each and every instance of openssl is "updated" ?t | 12:35:35 |
nim65s | otherwise, I would just go for:
packages.default = pkgs.openssl.overrideAttrs (_old: rec {
version = "0.1";
src = pkgs.fetchurl { url = "https://www.openssl.org/source/openssl-${version}.tar.gz"; };
});
| 12:36:28 |
nim65s | or packages.old-openssl if you prefer | 12:36:44 |
qu4pk4 | Hmm, good point. | 12:40:56 |
| flameopathic joined the room. | 18:03:55 |
| Zach joined the room. | 21:24:02 |
| 20 Jun 2024 |
| nyanbinary 🏳️⚧️ joined the room. | 00:09:39 |
| @vengmark2:matrix.org left the room. | 01:26:07 |
| 21 Jun 2024 |
| @linus:schreibt.jetzt left the room. | 14:06:08 |
qu4pk4 | Thanks, this worked out for me in the end! | 14:44:13 |
qu4pk4 | I have read various threads on command line arguments for Flake builds, runs - is it still the case, that one cannot do like:
$ nix run -dOpenSSLVerion=3.1.5
$ nix run -dOpenSSLVerion=3.2.2
And dynamically different package/app would be built?
| 14:45:56 |
qu4pk4 | It might not work also because the version is then put into fetchUrl, which also needs the hash, but maybe that could be worked around as well somehow. | 14:46:30 |