| 8 Aug 2023 |
Lily Foster | But now vendored and non-vendored get the exact same error | 22:37:42 |
Lily Foster | So something's hecked somewhere | 22:37:45 |
Lily Foster | And idk where you got your lockfile from | 22:37:49 |
Lily Foster | The one that did work | 22:37:53 |
@gdesforges:matrix.org | From marp-cli GitHub repo tag 3.1.0 | 22:38:23 |
Lily Foster | Did they retag or something? It differed from what I pulled from the tag | 22:38:43 |
Lily 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 | https://github.com/marp-team/marp-cli/blob/a6a3fd21f605e4dcc723aacd9649b9e4c92de021/yarn.lock | 22:40:26 |
@gdesforges:matrix.org | Well I'll be damned | 22:40:42 |
@gdesforges:matrix.org | IDK | 22:40:44 |
Lily Foster | So that you can poke at the same thing I am if you want, I just pushed to https://github.com/lilyinstarlight/nixpkgs/tree/tmp/marp | 22:41:45 |
Lily Foster | For 3.2.0 | 22:41:48 |
Lily Foster | With the upstream lockfile I directly curl'd | 22:41:55 |
Lily Foster | github:lilyinstarlight/nixpkgs/tmp/marp#marp-cli if you wanted to build it from flake uri | 22:43:32 |
Lily Foster | Hmmm I think this might be a yarn2nix bug | 22:44:13 |
Lily Foster | I'm gonna try it using fetchYarnDeps and mkDerivation instead of mkYarnPackage and see what it does | 22:44:29 |
Lily Foster | Yeah this is 100% a yarn2nix bug. I just built marp-cli without it just fine | 22:53:42 |
Lily 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 Foster | Feel free to steal that entirely. I don't much want to invest more work in yarn2nix than I have to | 23:05:16 |
Lily Foster | That does basically the same thing buildYarnPackage will when it's done | 23:05:25 |
@gdesforges:matrix.org | Well 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 Foster | Rest wlel! | 23:09:18 |
Lily Foster | * Rest well! | 23:09:19 |
@gdesforges:matrix.org | Thank you so much for your dedication | 23:09:28 |
@gdesforges:matrix.org | Let me know if there is a way to pay you a tip/coffee:) | 23:09:43 |
Lily Foster | Yeah, happy to help. Apologies it took me this long to have the time/bandwidth to dig into it 😅 | 23:09:45 |
@gdesforges:matrix.org | * Let me know if there is a way to pay you a tip/coffee :) | 23:09:50 |
Lily 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 | I wouldn't ask if I felt pressured | 23:13:14 |
| @janik0:matrix.org joined the room. | 23:14:34 |