!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1518 Members
Nix programming language267 Servers

Load older messages


SenderMessageTime
19 Jul 2024
@traxys:familleboyer.netTraxysBy any chance is there a way to know the git branch in a flake? I need to generate a package differently if it's from the main branch vs a stable branch (mostly links to the corresponding branch)18:04:40
@tomberek:matrix.orgtomberekNo. Because branches are mutable over time, this would allow you to have two different outcomes over time for the same commit. The way to do this would be to run a packaging script prior to your build that would add the branch name into a file of the flake, then running a "dirty" build.18:36:28
@duanin2:duanin2.topDuanin2 joined the room.18:47:02
@mattsturg:matrix.orgMatt SturgeonOr alternatively (since I assume you mean a branched off release) define the "release name" in a file/variable/whatever (committed to the repo)19:20:19
@glepage:matrix.orgGaétan LepageThis is what is being done in nixpkgs I think19:35:44
@mattsturg:matrix.orgMatt Sturgeon
In reply to @glepage:matrix.org
This is what is being done in nixpkgs I think
Yes they have lib.release or something similarly named
19:49:28
@mattsturg:matrix.orgMatt Sturgeon* Yes they have  lib.release  or something similarly named, which just a string literal defined somewhere 19:50:07
@mattsturg:matrix.orgMatt Sturgeon* Yes they have  `lib.release`  or something similarly named, which just a string literal defined somewhere19:50:16
@cathal03:matrix.orgCathal OGradycan I have a thin nix shell that does not dowload gcc coreutils etc ?23:09:45
@ss:someonex.netSomeoneSerge (utc+3)s/branches/branches and tags/23:31:17
20 Jul 2024
@infinisil:matrix.orginfinisil Cathal OGrady: pkgs.mkShellNoCC should do it mostly 01:43:46
@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

Show newer messages


Back to Room ListRoom Version: 6