aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/bash/meson.build7
-rw-r--r--misc/capnproto.nix60
-rw-r--r--misc/fish/meson.build7
-rw-r--r--misc/meson.build6
-rw-r--r--misc/zsh/meson.build7
5 files changed, 70 insertions, 17 deletions
diff --git a/misc/bash/meson.build b/misc/bash/meson.build
index 75acce2ea..178692536 100644
--- a/misc/bash/meson.build
+++ b/misc/bash/meson.build
@@ -1,8 +1,7 @@
-configure_file(
- input : 'completion.sh',
- output : 'nix',
+fs.copyfile(
+ 'completion.sh',
+ 'nix',
install : true,
install_dir : datadir / 'bash-completion/completions',
install_mode : 'rw-r--r--',
- copy : true,
)
diff --git a/misc/capnproto.nix b/misc/capnproto.nix
new file mode 100644
index 000000000..0160050a0
--- /dev/null
+++ b/misc/capnproto.nix
@@ -0,0 +1,60 @@
+# FIXME: upstream to nixpkgs (do NOT build with gcc due to gcc coroutine bugs)
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ cmake,
+ openssl,
+ zlib,
+}:
+assert stdenv.cc.isClang;
+stdenv.mkDerivation rec {
+ pname = "capnproto";
+ version = "1.0.2";
+
+ # release tarballs are missing some ekam rules
+ src = fetchFromGitHub {
+ owner = "capnproto";
+ repo = "capnproto";
+ rev = "v${version}";
+ sha256 = "sha256-LVdkqVBTeh8JZ1McdVNtRcnFVwEJRNjt0JV2l7RkuO8=";
+ };
+
+ nativeBuildInputs = [ cmake ];
+ propagatedBuildInputs = [
+ openssl
+ zlib
+ ];
+
+ # FIXME: separate the binaries from the stuff that user systems actually use
+ # This runs into a terrible UX issue in Lix and I just don't want to debug it
+ # right now for the couple MB of closure size:
+ # https://git.lix.systems/lix-project/lix/issues/551
+ # outputs = [ "bin" "dev" "out" ];
+
+ cmakeFlags = [
+ (lib.cmakeBool "BUILD_SHARED_LIBS" true)
+ # Take optimization flags from CXXFLAGS rather than cmake injecting them
+ (lib.cmakeFeature "CMAKE_BUILD_TYPE" "None")
+ ];
+
+ env = {
+ # Required to build the coroutine library
+ CXXFLAGS = "-std=c++20";
+ };
+
+ separateDebugInfo = true;
+
+ meta = with lib; {
+ homepage = "https://capnproto.org/";
+ description = "Cap'n Proto cerealization protocol";
+ longDescription = ''
+ Cap’n Proto is an insanely fast data interchange format and
+ capability-based RPC system. Think JSON, except binary. Or think Protocol
+ Buffers, except faster.
+ '';
+ license = licenses.mit;
+ platforms = platforms.all;
+ maintainers = lib.teams.lix.members;
+ };
+}
diff --git a/misc/fish/meson.build b/misc/fish/meson.build
index d54de9a13..7f9cd0896 100644
--- a/misc/fish/meson.build
+++ b/misc/fish/meson.build
@@ -1,8 +1,7 @@
-configure_file(
- input : 'completion.fish',
- output : 'nix.fish',
+fs.copyfile(
+ 'completion.fish',
+ 'nix.fish',
install : true,
install_dir : datadir / 'fish/vendor_completions.d',
install_mode : 'rw-r--r--',
- copy : true,
)
diff --git a/misc/meson.build b/misc/meson.build
index bf3c157f7..4e2f6aacf 100644
--- a/misc/meson.build
+++ b/misc/meson.build
@@ -5,8 +5,4 @@ subdir('zsh')
subdir('systemd')
subdir('flake-registry')
-runinpty = configure_file(
- copy : true,
- input : meson.current_source_dir() / 'runinpty.py',
- output : 'runinpty.py',
-)
+runinpty = fs.copyfile('runinpty.py')
diff --git a/misc/zsh/meson.build b/misc/zsh/meson.build
index 8063a5cb8..bd388a31f 100644
--- a/misc/zsh/meson.build
+++ b/misc/zsh/meson.build
@@ -1,10 +1,9 @@
foreach script : [ [ 'completion.zsh', '_nix' ], [ 'run-help-nix' ] ]
- configure_file(
- input : script[0],
- output : script.get(1, script[0]),
+ fs.copyfile(
+ script[0],
+ script.get(1, script[0]),
install : true,
install_dir : datadir / 'zsh/site-functions',
install_mode : 'rw-r--r--',
- copy : true,
)
endforeach