!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

211 Members
62 Servers

Load older messages


SenderMessageTime
8 Aug 2023
@lily:lily.flowersLily FosterBut now vendored and non-vendored get the exact same error22:37:42
@lily:lily.flowersLily FosterSo something's hecked somewhere22:37:45
@lily:lily.flowersLily FosterAnd idk where you got your lockfile from22:37:49
@lily:lily.flowersLily FosterThe one that did work22:37:53
@gdesforges:matrix.org@gdesforges:matrix.orgFrom marp-cli GitHub repo tag 3.1.022:38:23
@lily:lily.flowersLily FosterDid they retag or something? It differed from what I pulled from the tag22:38:43
@lily:lily.flowersLily Foster
In reply to @gdesforges:matrix.org
From marp-cli GitHub repo tag 3.1.0
When I run this from your branch, they do not match:diff "$(nix eval --raw .#marp-cli.src)/yarn.lock" pkgs/tools/typesetting/marp/yarn.lock
22:39:53
@gdesforges:matrix.org@gdesforges:matrix.orghttps://github.com/marp-team/marp-cli/blob/a6a3fd21f605e4dcc723aacd9649b9e4c92de021/yarn.lock22:40:26
@gdesforges:matrix.org@gdesforges:matrix.orgWell I'll be damned 22:40:42
@gdesforges:matrix.org@gdesforges:matrix.orgIDK22:40:44
@lily:lily.flowersLily FosterSo that you can poke at the same thing I am if you want, I just pushed to https://github.com/lilyinstarlight/nixpkgs/tree/tmp/marp22:41:45
@lily:lily.flowersLily FosterFor 3.2.022:41:48
@lily:lily.flowersLily FosterWith the upstream lockfile I directly curl'd22:41:55
@lily:lily.flowersLily Foster github:lilyinstarlight/nixpkgs/tmp/marp#marp-cli if you wanted to build it from flake uri 22:43:32
@lily:lily.flowersLily FosterHmmm I think this might be a yarn2nix bug22:44:13
@lily:lily.flowersLily Foster I'm gonna try it using fetchYarnDeps and mkDerivation instead of mkYarnPackage and see what it does 22:44:29
@lily:lily.flowersLily FosterYeah this is 100% a yarn2nix bug. I just built marp-cli without it just fine22:53:42
@lily:lily.flowersLily Foster

Guillaume Desforges: For the record, here's the derivation I wrote that seems to work:

{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, makeWrapper
, nodejs
, prefetch-yarn-deps
, yarn
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "marp-cli";
  version = "3.2.0";

  src = fetchFromGitHub {
    owner = "marp-team";
    repo = "marp-cli";
    rev = "v${finalAttrs.version}";
    hash = "sha256-bx5mq5KI85qUct/9Hr6mby6dWmRkmpVbiIw+M8PZas8=";
  };

  offlineCache = fetchYarnDeps {
    yarnLock = "${finalAttrs.src}/yarn.lock";
    hash = "sha256-BogCt7ezmWxv2YfhljHYoBf47/FHR0qLZosjnoQhqgs=";
  };

  nativeBuildInputs = [
    makeWrapper
    nodejs
    prefetch-yarn-deps
    yarn
  ];

  configurePhase = ''
    runHook preConfigure

    export HOME=$(mktemp -d)
    yarn config --offline set yarn-offline-mirror $offlineCache
    fixup-yarn-lock yarn.lock
    yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
    patchShebangs node_modules

    runHook postConfigure
  '';

  buildPhase = ''
    runHook preBuild

    yarn --offline build

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    yarn --offline --production install

    mkdir -p $out/lib/node_modules/@marp-team/marp-cli
    cp -r lib node_modules marp-cli.js $out/lib/node_modules/@marp-team/marp-cli/

    makeWrapper "${nodejs}/bin/node" "$out/bin/marp" \
      --add-flags "$out/lib/node_modules/@marp-team/marp-cli/marp-cli.js"

    runHook postInstall
  '';

  meta = with lib; {
    description = "About A CLI interface for Marp and Marpit based converters";
    homepage = "https://github.com/marp-team/marp-cli";
    license = licenses.mit;
    maintainers = with maintainers; [ GuillaumeDesforges ];
    platforms = nodejs.meta.platforms;
  };
})
23:05:04
@lily:lily.flowersLily FosterFeel free to steal that entirely. I don't much want to invest more work in yarn2nix than I have to23:05:16
@lily:lily.flowersLily Foster That does basically the same thing buildYarnPackage will when it's done 23:05:25
@gdesforges:matrix.org@gdesforges:matrix.orgWell thank you! It's 1am over here so it'll have to wait tomorrow, but I'll look into it for sure!23:08:59
@lily:lily.flowersLily FosterRest wlel!23:09:18
@lily:lily.flowersLily Foster * Rest well!23:09:19
@gdesforges:matrix.org@gdesforges:matrix.orgThank you so much for your dedication 23:09:28
@gdesforges:matrix.org@gdesforges:matrix.orgLet me know if there is a way to pay you a tip/coffee:)23:09:43
@lily:lily.flowersLily FosterYeah, happy to help. Apologies it took me this long to have the time/bandwidth to dig into it 😅23:09:45
@gdesforges:matrix.org@gdesforges:matrix.org* Let me know if there is a way to pay you a tip/coffee :)23:09:50
@lily:lily.flowersLily Foster
In reply to @gdesforges:matrix.org
Let me know if there is a way to pay you a tip/coffee :)
I mean I do have liberapay and ko-fi both set up now, but don't feel pressured to (I would of course always appreciate coffee though...)
23:10:49
@gdesforges:matrix.org@gdesforges:matrix.orgI wouldn't ask if I felt pressured23:13:14
@janik0:matrix.org@janik0:matrix.org joined the room.23:14:34

Show newer messages


Back to Room ListRoom Version: 6