This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
generated from Program-Learning/nur-packages-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edb175d
commit 12bb63b
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import ./waybar-bluetooth_battery_parse.nix |
43 changes: 43 additions & 0 deletions
43
pkgs/waybar-bluetooth_battery_parse/waybar-bluetooth_battery_parse.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# When you use pkgs.callPackage, parameters here will be filled with packages from Nixpkgs (if there's a match) | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, ... | ||
} @ args: | ||
|
||
stdenv.mkDerivation rec { | ||
# Specify package name and version | ||
pname = "waybar-bluetooth_battery_parse"; | ||
version = "0.0.1"; | ||
|
||
# Download source code from GitHub | ||
src = fetchFromGitHub ({ | ||
owner = "Program-Learning"; | ||
repo = "waybar-bluetooth_battery_parse"; | ||
# Commit or tag, note that fetchFromGitHub cannot follow a branch! | ||
# rev = "0.7.1"; | ||
# Download git submodules, most packages don't need this | ||
fetchSubmodules = false; | ||
# Don't know how to calculate the SHA256 here? Comment it out and build the package | ||
# Nix will raise an error and show the correct hash | ||
sha256 = "sha256-m20M4+3zsH40hTpMJG9cyIjXp0xcCUBS+cCiRVLXFqM="; | ||
}); | ||
|
||
# Parallel building, drastically speeds up packaging, enabled by default. | ||
# You only want to turn this off for one of the rare packages that fails with this. | ||
enableParallelBuilding = true; | ||
# If you encounter some weird error when packaging CMake-based software, try enabling this | ||
# This disables some automatic fixes applied to CMake-based software | ||
dontFixCmake = true; | ||
|
||
# Add CMake to the building environment, to generate Makefile with it | ||
nativeBuildInputs = [ cmake ]; | ||
|
||
# Arguments to CMake that controls functionalities of liboqs | ||
cmakeFlags = [ | ||
"-DBUILD_SHARED_LIBS=ON" | ||
]; | ||
|
||
# stdenv.mkDerivation automatically does the rest for you | ||
} |