!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1518 Members
Nix programming language267 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
20 Jul 2024
@brisingr05:matrix.orgbrisingr05 left the room.05:48:38
@brisingr05:matrix.orgbrisingr05 joined the room.05:57:15
@cathal03:matrix.orgCathal OGrady
In reply to@infinisil:matrix.org
Cathal OGrady: pkgs.mkShellNoCC should do it mostly
thank you !
09:48:44
@username:yatrix.org@username:yatrix.org left the room.10:23:13
@phileas:asra.gr@phileas:asra.gr left the room.16:53:14
@felixfahrbahn:matrix.org@felixfahrbahn:matrix.org left the room.17:51:25
@fjeauntyd:matrix.org@fjeauntyd:matrix.org

hi, folks
what's wrong with this trivial example

 let
  # factorial : int —> int
  factorial = n: if n == 0 then 1
                           else n * factorial (n — 1);
 in
  factorial 5

results in error

[Running: nix-instantiate --eval play.nix]
error: syntax error, unexpected invalid token, expecting ')'

       at /home/play.nix:4:49:

            3|   factorial = n: if n == 0 then 1
            4|                            else n * factorial (n — 1);
             |                                                 ^
            5|  in
[Command exited with 1]
19:27:10
@aloisw:kde.org@aloisw:kde.orgI don't think Nix supports all of these weird Unicode characters you have around the "minus" sign (that's an em dash to begin with).19:32:47
@fjeauntyd:matrix.org@fjeauntyd:matrix.org
In reply to @aloisw:kde.org
I don't think Nix supports all of these weird Unicode characters you have around the "minus" sign (that's an em dash to begin with).

oh, ok, thx, that's some artifact of copy-paste from a browser page, some strange non-space whitespace and em dash instead of hyphen

19:39:04
@andmuz:matrix.organdmuz left the room.19:45:51
21 Jul 2024
@creepinson:matrix.org@creepinson:matrix.org left the room.00:07:51
@abbe_c:matrix.org@abbe_c:matrix.org left the room.05:46:49
@mrprofessor:matrix.org@mrprofessor:matrix.org left the room.16:32:55
@magictablesalt:matrix.orgmagictablesalt joined the room.23:18:47
22 Jul 2024
@tdrr:matrix.orgTdrRedacted or Malformed Event01:03:11
@brokenpip3:matrix.org@brokenpip3:matrix.org left the room.07:46:08
@silver:matrix.brendan.iesilver joined the room.15:04:43
@jpc:ejpcmac.netejpcmac joined the room.15:08:25
@bashfulrobot.:matrix.orgbashfulrobot joined the room.17:16:07
23 Jul 2024
@ezzobirbezziou:matrix.orgEzzobir Bezziou joined the room.08:19:01
@buttars:matrix.orgTommyJ joined the room.22:08:40
24 Jul 2024
@redstone-menace:matrix.orgRedstone joined the room.10:15:56
@quapka4:matrix.orgquapka4 joined the room.12:15:57
@quapka4:matrix.orgquapka4

Hi folks, how to default to latest version of package if version is not passed, something like this:

openssl = { version }: pkgs.openssl.overrideAttrs (final: prev: {
  if version {
    src = {
      rev = "${version}";
};
});
12:19:46
@quapka4:matrix.orgquapka4 *

Hi folks, how to default to latest version of package if version is not passed, something like this:

openssl = { version }: pkgs.openssl.overrideAttrs (final: prev: {
  if version {
    src = {
      rev = "${version}";
};
});
12:19:52
@quapka4:matrix.orgquapka4So, optionally change the source.12:20:19
@quapka4:matrix.orgquapka4 Latest meaning the latest version of OpenSSL in nixpkgs, not the HEAD of the repo. 12:21:38
@quapka4:matrix.orgquapka4 So, I don't think I want { version ? "master" }. 12:22:02
@quapka4:matrix.orgquapka4

Ah:

          src = if version != "" then pkgs.fetchurl {
            url = "https://www.openssl.org/source/openssl-${version}.tar.gz";
            hash = hash;
          } else
          prev.src;

does the job.

13:27:54

Show newer messages


Back to Room ListRoom Version: 6