From 320afb78c507e2d1c61f4927e3cb9ef03382d8a4 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Tue, 4 Jul 2023 03:22:36 +0300 Subject: Use build.zig.zon for fetching xdg --- build.zig | 3 ++- build.zig.zon | 4 ++++ libs/xdg | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 160000 libs/xdg diff --git a/build.zig b/build.zig index dbcfc7b..b953275 100644 --- a/build.zig +++ b/build.zig @@ -16,6 +16,7 @@ pub fn build(b: *Build) void { const clap = b.dependency("clap", .{}); const curl = b.dependency("curl", .{}); const libarchive = b.dependency("libarchive", .{}); + const xdg = b.dependency("xdg", .{}); const exe = b.addExecutable(.{ .name = "zup", @@ -28,7 +29,7 @@ pub fn build(b: *Build) void { exe.addModule("clap", clap.module("clap")); exe.addModule("curl", curl.module("curl")); exe.addModule("libarchive", libarchive.module("libarchive")); - exe.addModule("xdg", b.createModule(.{ .source_file = .{ .path = "libs/xdg/xdg.zig" } })); + exe.addModule("xdg", xdg.module("xdg")); exe.linkLibC(); exe.linkSystemLibrary("libarchive"); exe.linkSystemLibrary("libcurl"); diff --git a/build.zig.zon b/build.zig.zon index 72d7b61..151d3f2 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -15,5 +15,9 @@ .url = "https://git.sr.ht/~ukko/zig-libarchive/archive/b70c51b8555e68e73c36b0e691dff65c0092baf6.tar.gz", .hash = "12206a8120d9a7550112f2fcc908c46900d6882c95156f900d5e0b39fcdb6a64a065", }, + .xdg = .{ + .url = "https://git.sr.ht/~ukko/zig-xdg/archive/0102cd3c3ea6b5ad61e6afdc6de800621488c956.tar.gz", + .hash = "122012e83994a01a6faede69260f30bf25d3c7b9c2a6ef5226ce9b3e7ccd13b54898", + }, }, } diff --git a/libs/xdg b/libs/xdg deleted file mode 160000 index 26639e5..0000000 --- a/libs/xdg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 26639e50682ecb0f7373935de2dbc8d1d2319226 -- cgit v1.2.3