!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1518 Members
Nix programming language267 Servers

Load older messages


SenderMessageTime
1 Aug 2024
@penguin_brian:matrix.orgBrian May joined the room.07:07:44
@quapka4:matrix.orgquapka4

Hi, I struggle a bit with building one package, that expects OPENSSL_INSTALL_DIR pointing to the directory containing the lib directory with the lib<name>.so files. However openssl.out points to bin and lib.makeLibraryPath [ openssl ] gives the /lib suffix. What I did is:

cmakeFlags = [
 ( "-DOPENSSL_INSTALL_DIR=" + lib.makeLibraryPath [ openssl ] + "/.." )
];

However, is there a clearer way how to get the path to the lib derivation output without the `lib` part?
10:32:18
@quapka4:matrix.orgquapka4 *

Hi, I struggle a bit with building one package, that expects OPENSSL_INSTALL_DIR pointing to the directory containing the lib directory with the lib<name>.so files. However openssl.out points to bin and lib.makeLibraryPath [ openssl ] gives the /lib suffix. What I did is:

cmakeFlags = [
 ( "-DOPENSSL_INSTALL_DIR=" + lib.makeLibraryPath [ openssl ] + "/.." )
];

However, is there a clearer way how to get the path to the lib derivation output without the lib part?

10:32:22
@quapka4:matrix.orgquapka4 *

Hi, I struggle a bit with building one package, that expects OPENSSL_INSTALL_DIR pointing to the directory containing the lib directory with the lib<name>.so files. However openssl.out points to bin and lib.makeLibraryPath [ openssl ] gives the /lib suffix. What I did is:

cmakeFlags = [
 ( "-DOPENSSL_INSTALL_DIR=" + lib.makeLibraryPath [ openssl ] + "/.." )
];

However, is there a clearer way how to get the path to the lib derivation output without the lib part?

10:32:44
@cleverca22:matrix.orgcleverca22 joined the room.12:52:22
@qyriad:katesiria.orgQyriad @quapka4 "-DOPENSSL_INSTALL_DIR=${lib.getLib openssl}/lib"? 14:58:32
@qyriad:katesiria.orgQyriad Oh wait, you want without the lib suffix? lib.getLib openssl 14:59:22
@qyriad:katesiria.orgQyriad Oh wait, you want without the /lib suffix? Then just lib.getLib openssl 14:59:28
2 Aug 2024
@tinwood:matrix.orgAlex (tinwood) changed their display name from Alex K (tinwood) to Alex (tinwood).10:42:37
@rayne:spooky.computer@rayne:spooky.computer 11:52:19
@papanito:matrix.orgpapanito joined the room.12:32:53
@cosmia:matrix.org@cosmia:matrix.org joined the room.13:14:07
@cosmia:matrix.org@cosmia:matrix.org left the room.13:25:52
@minec:ins4.xyz@minec:ins4.xyz changed their display name from minec to minec (Old).18:43:17
@minec:ins4.xyz@minec:ins4.xyz left the room.18:52:01
@dykeaura:matrix.org@dykeaura:matrix.org left the room.19:36:51
3 Aug 2024
@knoopx:matrix.orgVíctor Martínez joined the room.10:34:55
@glepage:matrix.orgGaétan Lepage Hey,
Is it possible to escape a ${foo} in a nix string ?
17:10:39
@philiptaron:matrix.orgPhilip Taron (UTC-8)
Welcome to Nix 2.18.5. Type :? for help.

nix-repl> ''
          ''${foo}
          ''
"\${foo}\n"

nix-repl> ''''${foo}''
"\${foo}"
17:14:25
@emilazy:matrix.orgemily just putting this here to scare you ''''\'''${a}'' 17:18:06
@glepage:matrix.orgGaétan Lepage

Thanks... I'm not super sure to make it work in my case though

    substituteInPlace src/python/CMakeLists.txt \
      --replace-fail "find_package(pybind11 ${PYBIND11_VER} QUIET)" "find_package(pybind11 QUIET)"
17:18:10
@emilazy:matrix.orgemily pybind11 ''${PYBIND11_VER} 17:18:20
@glepage:matrix.orgGaétan Lepage which is already in a postPatch = '' 17:18:28
@emilazy:matrix.orgemilywelcome to the worst string syntax in the universe!17:18:30
@emilazy:matrix.orgemily oh, but also your "" will cause problems 17:18:43
@emilazy:matrix.orgemily because bash will also try to expand it 17:18:47
@emilazy:matrix.orgemily so you need 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 17:18:53
@glepage:matrix.orgGaétan Lepage ERROR: pattern find_package\(pybind11\ \ QUIET\) doesn't match anything 17:18:59
@emilazy:matrix.orgemily
In reply to @emilazy:matrix.org
because bash will also try to expand it
because ^
17:19:09
@glepage:matrix.orgGaétan LepageOk, so going with a proper patch file might be the best option here then17:19:32

Show newer messages


Back to Room ListRoom Version: 6