-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nix-build for multi-arch static binaries
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
- Loading branch information
1 parent
6feea14
commit 1238760
Showing
13 changed files
with
137 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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.orig | ||
*.test | ||
/target | ||
/result | ||
/vendor | ||
.build | ||
latest-*.txt | ||
|
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
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
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 @@ | ||
default.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,7 @@ | ||
(import ./nixpkgs.nix { | ||
crossSystem = { | ||
config = "aarch64-unknown-linux-gnu"; | ||
}; | ||
overlays = [ (import ./overlay.nix) ]; | ||
}).callPackage ./derivation.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,7 @@ | ||
(import ./nixpkgs.nix { | ||
crossSystem = { | ||
config = "powerpc64le-unknown-linux-gnu"; | ||
}; | ||
overlays = [ (import ./overlay.nix) ]; | ||
}).callPackage ./derivation.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,4 @@ | ||
(import ./nixpkgs.nix { | ||
overlays = [ (import ./overlay.nix) ]; | ||
}).callPackage ./derivation.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,23 @@ | ||
{ pkgs }: | ||
with pkgs; rustPlatform.buildRustPackage { | ||
name = "conmon-rs"; | ||
src = ./..; | ||
doCheck = false; | ||
nativeBuildInputs = with buildPackages; [ | ||
capnproto | ||
protobuf | ||
]; | ||
buildInputs = [ | ||
glibc | ||
glibc.static | ||
]; | ||
RUSTFLAGS = [ | ||
"-Ctarget-feature=+crt-static" | ||
]; | ||
stripAllList = [ "bin" ]; | ||
cargoLock = { | ||
lockFile = lib.cleanSource ./.. + "/Cargo.lock"; | ||
allowBuiltinFetchGit = true; | ||
}; | ||
} | ||
|
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,12 @@ | ||
{ | ||
"url": "https://github.com/nixos/nixpkgs", | ||
"rev": "c44317643ebf160b50a86a23d203d99aaee8c133", | ||
"date": "2023-09-08T07:22:05+00:00", | ||
"path": "/nix/store/gscd59h9fppxwblgz19q24wg0jj8x4gg-nixpkgs", | ||
"sha256": "1kr94ygwqirgmfpzyz3qz3wjfp28rqbmz2n565mssrlk0j3khwqx", | ||
"hash": "sha256-HXM4hwSTZq1rMcWKXxfOSFwn+fh4fP+vqy9HzJ8nKc8=", | ||
"fetchLFS": false, | ||
"fetchSubmodules": false, | ||
"deepClone": false, | ||
"leaveDotGit": false | ||
} |
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,8 @@ | ||
let | ||
json = builtins.fromJSON (builtins.readFile ./nixpkgs.json); | ||
nixpkgs = import (builtins.fetchTarball { | ||
name = "nixos-unstable"; | ||
url = "${json.url}/tarball/${json.rev}"; | ||
inherit (json) sha256; | ||
}); | ||
in nixpkgs |
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,5 @@ | ||
let | ||
static = import ./static.nix; | ||
in | ||
self: super: | ||
{ } |
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,10 @@ | ||
pkg: pkg.overrideAttrs (x: { | ||
doCheck = false; | ||
configureFlags = (x.configureFlags or [ ]) ++ [ | ||
"--without-shared" | ||
"--disable-shared" | ||
]; | ||
dontDisableStatic = true; | ||
enableSharedExecutables = false; | ||
enableStatic = true; | ||
}) |