Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
593bdbbc
Commit
593bdbbc
authored
Jan 19, 2023
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop get-nix-kconfig.py (`nix-build get-nixos-kconfig.nix` does the job)
Refers to #77 and #63.
parent
0267c39d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
get-nix-kconfig.py
...ig_hardened_check/config_files/distros/get-nix-kconfig.py
+0
-30
No files found.
kconfig_hardened_check/config_files/distros/get-nix-kconfig.py
deleted
100644 → 0
View file @
0267c39d
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3
import
json
import
os
import
shutil
import
subprocess
import
sys
from
tempfile
import
TemporaryDirectory
def
main
()
->
None
:
proc
=
subprocess
.
run
(
[
"nix"
,
"search"
,
"-u"
,
"--json"
,
"^nixpkgs.linux_"
],
capture_output
=
True
)
data
=
json
.
loads
(
proc
.
stdout
)
with
TemporaryDirectory
()
as
temp
:
for
pkg
in
data
.
keys
():
symlink
=
os
.
path
.
join
(
temp
,
pkg
)
res
=
subprocess
.
run
([
"nix"
,
"build"
,
f
"{pkg}.configfile"
,
"-o"
,
symlink
])
if
res
.
returncode
!=
0
:
print
(
f
"failed to get configuration for {pkg}"
,
file
=
sys
.
stderr
)
continue
name
=
f
"{pkg.replace('.', '-')}-config"
with
open
(
name
,
"w"
)
as
dst
,
open
(
symlink
)
as
src
:
shutil
.
copyfileobj
(
src
,
dst
)
if
__name__
==
"__main__"
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment