-
Notifications
You must be signed in to change notification settings - Fork 847
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init add portable pwndbg using nix, package for rpm,deb,arch,alpine
Signed-off-by: Patryk Sondej <patryk.sondej@gmail.com>
- Loading branch information
1 parent
dbdce5d
commit f3914e2
Showing
21 changed files
with
1,674 additions
and
58 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,44 @@ | ||
name: Releases | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
releases: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v3 | ||
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac # @v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: build pwndbg | ||
run: nix build '.?submodules=1#pwndbg' -o result-pwndbg | ||
|
||
- name: build rpm | ||
run: nix build '.?submodules=1#rpm' -o dist-rpm | ||
- name: build deb | ||
run: nix build '.?submodules=1#deb' -o dist-deb | ||
- name: build apk | ||
run: nix build '.?submodules=1#apk' -o dist-apk | ||
- name: build archlinux | ||
run: nix build '.?submodules=1#archlinux' -o dist-archlinux | ||
- name: build tarball | ||
run: nix build '.?submodules=1#tarball' -o dist-tarball | ||
|
||
- name: release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # @v1 | ||
with: | ||
files: | | ||
./dist-rpm/* | ||
./dist-deb/* | ||
./dist-apk/* | ||
./dist-archlinux/* | ||
./dist-tarball/* | ||
draft: true | ||
token: ${{ secrets.TOKEN }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,53 @@ | ||
{ | ||
description = "pwndbg"; | ||
|
||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
inputs.poetry2nix = { | ||
url = "github:nix-community/poetry2nix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, poetry2nix }: | ||
let | ||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; | ||
forPortables = nixpkgs.lib.genAttrs [ "deb" "rpm" "apk" "archlinux" ]; | ||
|
||
pkgsBySystem = forAllSystems (system: import nixpkgs { | ||
inherit system; | ||
overlays = [ poetry2nix.overlay ]; | ||
}); | ||
pkgUtil = forAllSystems (system: import ./nix/bundle/pkg.nix { | ||
pkgs = pkgsBySystem.${system}; | ||
}); | ||
|
||
portableDrv = system: import ./nix/portable.nix { | ||
pkgs = pkgsBySystem.${system}; | ||
pwndbg = self.packages.${system}.pwndbg; | ||
}; | ||
portableDrvs = system: forPortables (packager: pkgUtil.${system}.buildPackagePFPM { | ||
inherit packager; | ||
drv = portableDrv system; | ||
config = ./nix/bundle/nfpm.yaml; | ||
preremove = ./nix/bundle/preremove.sh; | ||
}); | ||
tarballDrv = system: { | ||
tarball = pkgUtil.${system}.buildPackageTarball { | ||
drv = portableDrv system; | ||
}; | ||
}; | ||
in | ||
{ | ||
packages = forAllSystems (system: { | ||
pwndbg = import ./nix/pwndbg.nix { | ||
pkgs = pkgsBySystem.${system}; | ||
python3 = pkgsBySystem.${system}.python3; | ||
gdb = pkgsBySystem.${system}.gdb; | ||
inputs.pwndbg = self; | ||
}; | ||
default = self.packages.${system}.pwndbg; | ||
} | ||
// (portableDrvs system) | ||
// (tarballDrv system) | ||
); | ||
}; | ||
} |
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
Oops, something went wrong.