Seems the package build a static version of libvips - which provides libresize_linux_amd64.a , using a shonky brittle shell scripts…and guess what, you can build everything with a docker container…exactly some of the problems that nix tries to solve :-).
The classic case of, Why was docker invented…‘so tensor flow could compile’.
so close, but …so far . enough for now! was a good bit of ‘fun’.
{ buildGoModule, fetchFromGitHub, lib, pkg-config, glib, vips }:
buildGoModule rec {
pname = "filestash";
version = "0.4";
src = fetchFromGitHub {
owner = "mickael-kerjean";
repo = "filestash";
rev = "030b5b0c941e06bb31d7baedc4185340e799cad7";
sha256 = "1nqdaxyf9inxdvglmi661c0ph8vl5ca3xgcic6y6kcybgzg1wady";
};
nativeBuildInputs = [ pkg-config ];
propagatedBuildInputs = [
glib vips
];
BuildInputs = [ vips];
#vendorSha256 = "1pnd89iqdj3f719xf4iy5r04n51d0rrrf0qb2zjirpw7vh7g82i9";
vendorSha256 = null;
subPackages = [ "server/." ];
#runVend = true;
meta = with lib; {
description = "A Dropbox-like file manager that let you manage your data anywhere it is located";
homepage = https://github.com/mickael-kerjean/filestash;
license = licenses.mit;
maintainers = with maintainers; [ nobody ];
platforms = platforms.linux;
};
}
Okay… well it works!. The original had lots of shells scripts to extract all the vips and libraw libraries into his custom libraries to build libresize.a & libtranscode.a , or they just curl a precompiled .a’s from his website!! :-). Seems that they had trouble getting these libraries to compile due to dependices etc etc…same old story…
I had to basically tell the go’s CGO to link in -lvips & -lraw (it seems libraw linker directive is not -llibraw…eeeeeeekkkkkk ARRRRRGGGHHHH LOL).
yeah, that would do it, like many things in linux/unix, the expect that things are in the usual places, and that those places are read/write, unlike the /nix/store.
It’s going to have to fixed upstream, or patch in the source code in the derivation. Either-way, it’s a bit of work.
@pinpox@nurelin I got a bit further, but instead of using node2nix for the conversion, I decided to use dream2nix and ran into the following issue. It would be wonderful if you could help debug or offer some insight on the issue, which seems to be to do with webpack loaders in dream2nix, and then we’ll have filestash almost fully packaged.
Sorry, I don’t have the time to continue right now on this. I’ll stay subscribed here in case there is any progress, but can’t provide much help currently myself.