
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
40 lines
2.2 KiB
Diff
40 lines
2.2 KiB
Diff
Build system that downloads stuff from network is bad. Build system that
|
|
does so unconditionally is twice as bad.
|
|
|
|
Required files are downloaded as separate fixed-output derivations and
|
|
put into correct location before build phase starts.
|
|
|
|
--- laminar-1.3/CMakeLists.txt
|
|
+++ laminar-1.3-new/CMakeLists.txt
|
|
@@ -82,13 +82,6 @@
|
|
COMMAND sh -c '( echo -n "\\#define INDEX_HTML_UNCOMPRESSED_SIZE " && wc -c < "${CMAKE_SOURCE_DIR}/src/resources/index.html" ) > index_html_size.h'
|
|
DEPENDS src/resources/index.html)
|
|
|
|
-# Download 3rd-party frontend JS libs...
|
|
-file(DOWNLOAD https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js
|
|
- js/vue.min.js EXPECTED_MD5 fb192338844efe86ec759a40152fcb8e)
|
|
-file(DOWNLOAD https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/ansi_up.js
|
|
- js/ansi_up.js EXPECTED_MD5 b31968e1a8fed0fa82305e978161f7f5)
|
|
-file(DOWNLOAD https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js
|
|
- js/Chart.min.js EXPECTED_MD5 7dd5ea7d2cf22a1c42b43c40093d2669)
|
|
# ...and compile them
|
|
generate_compressed_bins(${CMAKE_BINARY_DIR} js/vue.min.js
|
|
js/ansi_up.js js/Chart.min.js)
|
|
@@ -139,12 +132,12 @@
|
|
target_link_libraries(laminar-tests ${GTEST_LIBRARIES} capnp-rpc capnp kj-http kj-async kj pthread sqlite3 z)
|
|
endif()
|
|
|
|
-set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files")
|
|
-set(BASH_COMPLETIONS_DIR /usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
|
-set(ZSH_COMPLETIONS_DIR /usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
|
+set(SYSTEMD_UNITDIR lib/systemd/system CACHE PATH "Path to systemd unit files")
|
|
+set(BASH_COMPLETIONS_DIR usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
|
+set(ZSH_COMPLETIONS_DIR usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
|
install(TARGETS laminard RUNTIME DESTINATION sbin)
|
|
install(TARGETS laminarc RUNTIME DESTINATION bin)
|
|
-install(FILES etc/laminar.conf DESTINATION /etc)
|
|
+install(FILES etc/laminar.conf DESTINATION etc)
|
|
install(FILES etc/laminarc-completion.bash DESTINATION ${BASH_COMPLETIONS_DIR} RENAME laminarc)
|
|
install(FILES etc/laminarc-completion.zsh DESTINATION ${ZSH_COMPLETIONS_DIR} RENAME _laminarc)
|
|
|