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).
I donāt there is any way i regenerate these cgo flags in these files, I donāt think they are generated by automagically.,ā¦some cgo LDFLAGS areā¦
Now i need to patch files with nixā¦and should be in the home strait (jacket)ā¦?
the front end of this app is in node.js, so iām probably compleltly doomed!
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.