-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging request: Our Paint #208940
Comments
I didn't anticipate Our Paint gets this much attention but thanks for showing interest :D |
I have a flake that manages to build (see below). When actually running, it expects the fonts to be in a particular location in the home folder, I haven't found a workaround for that yet. I'll open a PR once I can run it from this flake. {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
outputs = inputs:
let
system = "x86_64-linux";
LaGUI = { stdenv, cmake, glew, freetype, libX11, libXi, libXcursor }: stdenv.mkDerivation {
pname = "LaGUI";
version = "5.0.0";
src = builtins.fetchGit {
url = "http://wellobserve.com/repositories/chengdulittlea/LaGUI.git";
ref = "master";
rev = "39b4062c583bfcd8e3157bd8077e7fddc52d8830";
};
nativeBuildInputs = [ cmake glew freetype libX11 libXi libXcursor ];
buildPhase = ''
export HOME=$TMP/tmphome
mkdir build
cd build
cmake ..
cd ..
make
'';
postInstall = ''
mv $HOME/.local/share $out
'';
};
OurPaint = { stdenv, cmake, LaGUI, libGL, libX11, freetype, glew, lcms2, libXfixes, libXi, libXcursor }: stdenv.mkDerivation {
pname = "OurPaint";
version = "0.1";
src = builtins.fetchGit {
url = "http://wellobserve.com/repositories/chengdulittlea/OurPaint.git";
ref = "master";
rev = "e4cd5e734f289cd72a6fb95ea1a51d27e7f5157d";
};
nativeBuildInputs = [ cmake LaGUI libGL libX11 freetype glew lcms2 libXfixes libXi libXcursor ];
buildPhase = ''
mkdir build
cd build
cmake ..
cd ..
make
'';
installPhase = ''
mkdir -p $out/bin
mv OurPaint $out/bin/
'';
};
overlay = final: prev: {
OurPaint = final.callPackage OurPaint { };
LaGUI = final.callPackage LaGUI { };
};
in
{
inherit overlay;
packages.${system} =
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ overlay ];
};
in
{
inherit (pkgs) OurPaint LaGUI;
default = pkgs.OurPaint;
};
};
} |
@ChengduLittleA Thanks for your work, I'm looking forward to playing around with this! The issue I run into is that Nix packages can't simply install fonts into the user directory. I want to patch in a different place to look for fonts, but I can't figure out what the best place for that would be. Any suggestions? |
Put the font folder directly adjacent to the executable should do the trick. There are 11 different relative/absolute paths that laGUI will search for its fonts. I will update the font configuration. In the source code... But I designed our paint to be portable so the font should come along with the software package (later I will include more custom font for icons). See my appimage for example |
I tried to package it in #209448. I don't know yet if it works because right now I'm on a computer with very low opengl version. @ChengduLittleA could you add |
Even if I put fonts in an expected location, I run into a segfault on startup. It might still be related to fonts (one fails to load for some reason), but either way there are more issues than just the font loading. Looking at the appimage script hasn't really helped me figure out what's up, so be warned I guess @fgaz |
@jonascarpay Any idea you could give me the stack trace on where it crashed? I think laGUI should not crash if there's at least one font that's loaded, so the crash might be other issue like graphics. (I later found out there's a typo in monospace font loader...) @fgaz I updated CMake list to install fonts into a prefix if the variable is not manually set. Default is |
It crashes for me too. Stack trace of current headStack trace of thread 2317: #0 0x00000000004aaf60 la_LabelGetMinWidth (OurPaint + 0xaaf60) #1 0x00000000004567fa la_AddRowNode (OurPaint + 0x567fa) #2 0x000000000045c6d7 la_UpdateUiListRecursive (OurPaint + 0x5c6d7) #3 0x000000000045de9d laEnclosePanelContent (OurPaint + 0x5de9d) #4 0x000000000045e0ff laEnableSplashPanel (OurPaint + 0x5e0ff) #5 0x00000000004329d7 our_EnableSplashPanel (OurPaint + 0x329d7) #6 0x000000000042d090 main (OurPaint + 0x2d090) #7 0x00007fe6db65424e __libc_start_call_main (libc.so.6 + 0x2924e) #8 0x00007fe6db654309 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x29309) #9 0x000000000042d1c5 _start (OurPaint + 0x2d1c5) |
@fgaz could be a GL context init problem. You could delete the preference file, or try v0.1b again |
Any progress here ? |
Project description
Metadata
The text was updated successfully, but these errors were encountered: