From 0a67ee242023db027436d1dce13918ce618c52a8 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 6 Feb 2025 16:59:29 -0600 Subject: [PATCH] Try to fix non-existent builds Somehow I'm ending up with no file. Try to diagnose why, but also try to fix it at the same problem without being 100% sure of the root cause --- .gitlab-ci.yml | 3 ++- flake.nix | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a86fba9..7d1be0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,8 @@ build: tags: - nix script: - - nix build -L ".#${ARCH}" + - nix run -L ".#${ARCH}" + - ls -l - URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/sword-utils/$TAG/sword-${ARCH}-${TAG}.tar.xz - >- if [ "$CI_COMMIT_BRANCH" == "main" ]; then diff --git a/flake.nix b/flake.nix index bd594bd..6e0c1be 100644 --- a/flake.nix +++ b/flake.nix @@ -83,11 +83,18 @@ } ); in - pkgs.writeShellScriptBin "package-sword" '' - out=$(pwd) - pushd ${svnSword} - ${pkgs.gnutar}/bin/tar cvhaf $out/sword.tar.xz * --transform "s+^+sword/+" - ''; + pkgs.writeShellApplication { + name = "package-sword"; + runtimeInputs = with pkgs; [ + gnutar + xz + ]; + text = '' + out=$(pwd) + pushd ${svnSword} + tar cvhaf "$out/sword.tar.xz" ./* --transform "s+^\\./+sword/+" + ''; + }; in with pkgs.pkgsCross; {