nix-community / vs-overlay

Overlay with VapourSynth plugins packaged for Nix
MIT License
12 stars 6 forks source link

awsmfunc git repo no longer exists #19

Open rncwind opened 1 year ago

rncwind commented 1 year ago

awsmfunc's git repo no longer exists. It seems that it's moved to https://github.com/OpusGang/awsmfunc I'm not versed enough in nix yet to patch this, sorry!

aidalgol commented 1 year ago

I've made a start on this in 073e0268cdff03b47dd8081fcd9ef6e152eed5f9, and I'm stuck on a build error complaining about Python 2.7 being marked as insecure. As far as I can tell, we're only ever referring to Python 3, and I can't figure out from the nix-build trace output where Python 2 is entering the picutre.

nix build output ``` ❯ nix-build --show-trace -E \ 'with import { config = { allowUnfree = true; cudaSupport = true; }; overlays = [ (import /path/to/vs-overlay) ]; }; runCommand "dummy" { buildInputs = [ vapoursynthPlugins.awsmfunc ]; } ""' error: … while calling the 'derivationStrict' builtin at /builtin/derivation.nix:9:12: (source not available) … while evaluating derivation 'dummy' whose name attribute is located at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:311:7 … while evaluating attribute 'buildInputs' of derivation 'dummy' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:358:7: 357| depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0; 358| buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1; | ^ 359| depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0; … while evaluating derivation 'python3.11-awsmfunc-1.3.4' whose name attribute is located at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:311:7 … while evaluating attribute 'buildInputs' of derivation 'python3.11-awsmfunc-1.3.4' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:358:7: 357| depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0; 358| buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1; | ^ 359| depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0; … while evaluating derivation 'vapoursynth-64-with-plugins' whose name attribute is located at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:311:7 … while evaluating attribute 'buildCommand' of derivation 'vapoursynth-64-with-plugins' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/build-support/trivial-builders/default.nix:87:14: 86| enableParallelBuilding = true; 87| inherit buildCommand name; | ^ 88| passAsFile = [ "buildCommand" ] … while evaluating derivation 'python3-3.11.5-env' whose name attribute is located at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:311:7 … while evaluating attribute 'passAsFile' of derivation 'python3-3.11.5-env' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/build-support/trivial-builders/default.nix:88:7: 87| inherit buildCommand name; 88| passAsFile = [ "buildCommand" ] | ^ 89| ++ (derivationArgs.passAsFile or []); … from call site at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/development/interpreters/python/wrapper.nix:20:13: 19| env = let 20| paths = requiredPythonModules (extraLibs ++ [ python ] ) ; | ^ 21| pythonPath = "${placeholder "out"}/${python.sitePackages}"; … while calling 'requiredPythonModules' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/development/interpreters/python/python-packages-base.nix:57:27: 56| # Get list of required Python modules given a list of derivations. 57| requiredPythonModules = drvs: let | ^ 58| modules = lib.filter hasPythonModule drvs; … from call site at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/development/interpreters/python/python-packages-base.nix:59:6: 58| modules = lib.filter hasPythonModule drvs; 59| in lib.unique ([python] ++ modules ++ lib.concatLists (lib.catAttrs "requiredPythonModules" modules)); | ^ 60| … while calling 'foldl'' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/lib/lists.nix:139:5: 138| # The list to fold 139| list: | ^ 140| … while calling 'hasPythonModule' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/development/interpreters/python/python-packages-base.nix:54:21: 53| # Check whether a derivation provides a Python module. 54| hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python; | ^ 55| … from call site at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/check-meta.nix:449:16: 448| { 449| no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; }; | ^ 450| warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; }; … while calling 'handleEvalIssue' at /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/stdenv/generic/check-meta.nix:226:38: 225| 226| handleEvalIssue = { meta, attrs }: { reason , errormsg ? "" }: | ^ 227| let error: Package ‘python-2.7.18.7’ in /nix/store/1i17s2aw3nhf9f665cwvvx37ngz0a9wx-nixpkgs/nixpkgs/pkgs/development/interpreters/python/cpython/2.7/default.nix:330 is marked as insecure, refusing to evaluate. Known issues: - Python 2.7 has reached its end of life after 2020-01-01. See https://www.python.org/doc/sunset-python-2/. You can install it anyway by allowing this package, using the following methods: a) To temporarily allow all insecure packages, you can use an environment variable for a single invocation of the nix tools: $ export NIXPKGS_ALLOW_INSECURE=1 Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+ (Flake) command, `--impure` must be passed in order to read this environment variable. b) for `nixos-rebuild` you can add ‘python-2.7.18.7’ to `nixpkgs.config.permittedInsecurePackages` in the configuration.nix, like so: { nixpkgs.config.permittedInsecurePackages = [ "python-2.7.18.7" ]; } c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add ‘python-2.7.18.7’ to `permittedInsecurePackages` in ~/.config/nixpkgs/config.nix, like so: { permittedInsecurePackages = [ "python-2.7.18.7" ]; } ```
sshiroi commented 1 year ago

I can't figure out from the nix-build trace output where Python 2 is entering the picutre.

its in the descale i think. Doing python = vapoursynth.python3; for that seems to fix.

aidalgol commented 1 year ago

I've made some progress. rekt and placebo also need to be updated, and I am stuck on the placebo build error.

nix build log ```console @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking sources unpacking source archive /nix/store/86z1rpka5p7mh69n7hzmipm445pm970d-source source root is source @nix { "action": "setPhase", "phase": "patchPhase" } patching sources @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } configuring meson flags: --buildtype=plain --libdir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/lib --libexecdir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/libexec --bindir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/bin --sbindir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/sbin --includedir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/include --mandir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/man --infodir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/info --localedir=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --prefix=/nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4 The Meson build system Version: 1.2.1 Source dir: /build/source Build dir: /build/source/build Build type: native build Project name: vs-placebo Project version: 1.4.4 C compiler for the host machine: gcc (gcc 12.3.0 "gcc (GCC) 12.3.0") C linker for the host machine: gcc ld.bfd 2.40 C++ compiler for the host machine: g++ (gcc 12.3.0 "g++ (GCC) 12.3.0") C++ linker for the host machine: g++ ld.bfd 2.40 Host machine cpu family: x86_64 Host machine cpu: x86_64 Found pkg-config: /nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2) Run-time dependency libplacebo found: YES 5.264.1 Run-time dependency vapoursynth found: YES 65 Did not find CMake 'cmake' Found CMake: NO Run-time dependency dovi found: NO (tried pkgconfig and cmake) Configuring config_vsplacebo.h using configuration Build targets in project: 2 vs-placebo 1.4.4 User defined options auto_features: enabled bindir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/bin buildtype : plain includedir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/include infodir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/info libdir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/lib libexecdir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/libexec localedir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/locale mandir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/share/man prefix : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4 sbindir : /nix/store/7zbwdb0k3p1wph59d2gffrmj9pn73sx5-vs-placebo-1.4.4/sbin wrap_mode : nodownload Found ninja-1.11.1 at /nix/store/jyk3j4632ldxsikjq0syjlj16i12jfsx-ninja-1.11.1/bin/ninja meson: enabled parallel building meson: enabled parallel installing @nix { "action": "setPhase", "phase": "buildPhase" } building build flags: -j32 [1/9] Compiling C object libvs_placebo.so.p/src_vs-placebo.c.o [2/9] Compiling C++ object libp2p.a.p/libp2p_v210.cpp.o [3/9] Compiling C object libvs_placebo.so.p/src_deband.c.o [4/9] Compiling C object libvs_placebo.so.p/src_shader.c.o ../src/shader.c: In function 'VSPlaceboShaderCreate': ../src/shader.c:301:9: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result] 301 | fread(shader, 1, fsize, fl); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [5/9] Compiling C object libvs_placebo.so.p/src_resample.c.o [6/9] Compiling C object libvs_placebo.so.p/src_tonemap.c.o ../src/tonemap.c: In function 'VSPlaceboTMGetFrame': ../src/tonemap.c:334:17: warning: unused variable 'dovi_profile' [-Wunused-variable] 334 | uint8_t dovi_profile = 0; | ^~~~~~~~~~~~ [7/9] Compiling C++ object libp2p.a.p/libp2p_p2p_api.cpp.o [8/9] Linking static target libp2p.a [9/9] Linking target libvs_placebo.so @nix { "action": "setPhase", "phase": "installPhase" } installing install flags: -j32 install [0/1] Installing files. Installing libvs_placebo.so to /nix/store/xv1cd56si2rq42yv9gjbkpxgdbqkrvdv-vapoursynth-65/lib/vapoursynth Traceback (most recent call last): File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 194, in run return options.run_func(options) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/minstall.py", line 863, in run installer.do_install(datafilename) File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/minstall.py", line 546, in do_install self.install_targets(d, dm, destdir, fullprefix) File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/minstall.py", line 740, in install_targets file_copied = self.do_copyfile(fname, outname, makedirs=(dm, outdir)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/minstall.py", line 423, in do_copyfile self.copy2(from_file, to_file) File "/nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/lib/python3.11/site-packages/mesonbuild/minstall.py", line 323, in copy2 shutil.copy2(*args, **kwargs) File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/shutil.py", line 258, in copyfile with open(dst, 'wb') as fdst: ^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: '/nix/store/xv1cd56si2rq42yv9gjbkpxgdbqkrvdv-vapoursynth-65/lib/vapoursynth/libvs_placebo.so' ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment. FAILED: meson-internal__install /nix/store/q3wya4bqvc7jcab9lzwnnn5qcaqpspm7-meson-1.2.1/bin/meson install --no-rebuild ninja: build stopped: subcommand failed. ``` @sbruder did you run into anything like this when you initially wrote this derivation?
sshiroi commented 1 year ago

I've made some progress. rekt and placebo also need to be updated, and I am stuck on the placebo build error. nix build log

I ran into that in the past.

https://github.com/Lypheo/vs-placebo/commit/9636e1fe890a69eb2b8dc2f9bee13df6f29aad97

https://github.com/sshiroi/vs-overlay/blob/0818757d94d6367bdc6ae4ab576fe078fef2fb9e/plugins/mesonB/placebo.nix#L16

https://github.com/nix-community/vs-overlay/blob/17ded7214ad981cc4598dd04cd26a140bc1aed58/plugins/placebo/default.nix#L20C1-L20C1